Linux kernel thread with Linux 2.6.x
Andy Fleming
afleming at freescale.com
Wed May 31 08:10:14 EST 2006
Couldn't you use a work_queue? For the PHY Layer, the MDIO
transactions can't occur at interrupt time (they need to be
interruptible), so the interrupt handler calls schedule_work() to get
the interrupt handled. I'm not sure how much faster it is (if at
all), but it's another method, and sounds less complicated than
waiting on a semaphore.
Of course, I would suggest trying to avoid the buffer allocation
functions you are using, or defer the work using NAPI, but it's
impossible for me to tell whether that's a reasonable solution for you.
On May 29, 2006, at 10:35, Laurent Lagrange wrote:
>
> Hello everybody,
>
> I'm writing a custom network driver based on a MPC8260 FCC device
> for a
> 2.6.9 linux kernel.
> In this driver, I need to use specific buffer allocation functions
> which use
> down and up semaphore functions.
>
> As the interrupt handler can't be scheduled, I have made a kernel
> thread
> which waits forever on a semaphore.
> This semaphore is set when a received packet interrupt occured. All
> that
> mechanism works but the performances
> are very poor.
>
> Is there any solution to increase the kthread priority in the
> scheduler ?
> Is there another solution than the semaphore to quickly wake up a
> kthread ?
>
> Thanks a lot for your help.
> Laurent
>
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded at ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
More information about the Linuxppc-embedded
mailing list