[prev in list] [next in list] [prev in thread] [next in thread]
List: linuxppc-embedded
Subject: Re: Linux kernel thread with Linux 2.6.x
From: Andy Fleming <afleming () freescale ! com>
Date: 2006-05-30 22:10:14
Message-ID: 72927AD7-DCFD-470E-A9FD-D3BE10100D53 () freescale ! com
[Download RAW message or body]
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@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic