Linux kernel thread with Linux 2.6.x

2006-06-06 Thread Laurent Lagrange
I have tried many solutions, the two last solutions (work_queue and kernel_thread) seem to have the same poor performances. Does anyone have another idea ? Thanks in advance. Laurent PS : eth_init_rx_bd function can allocate a new skbuff (YES parameter) or re-use the previous skbuff allocated to

Linux kernel thread with Linux 2.6.x

2006-05-30 Thread Andy Fleming
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

Linux kernel thread with Linux 2.6.x

2006-05-30 Thread [EMAIL PROTECTED]
Hi, do you have to use the semaphore or does a spinlock also meet your needs? If you are in kernel 2.4 you can use one of the task_queues (e.g the scheduler queue, timer and immediate queue also run at irq context) but that won't have a better speed than your solution because it also gets the proc

Linux kernel thread with Linux 2.6.x

2006-05-30 Thread Jörn Engel
On Tue, 30 May 2006 11:46:09 +0200, Laurent Lagrange wrote: > > Thanks for your answer, but a tasklet runs in interrupt context > (in_interrupt() != 0) so it doesn't support schedule() call > included in "down" semaphore function. Do you have code you can show? J?rn -- Data expands to fill the

Linux kernel thread with Linux 2.6.x

2006-05-30 Thread Laurent Lagrange
gmail.com] > Envoy? : lun. 29 mai 2006 18:13 > ? : Laurent Lagrange > Cc : linuxppc-embedded at ozlabs.org > Objet : Re: Linux kernel thread with Linux 2.6.x > > > > > > As the interrupt handler can't be scheduled, I have made a > kernel thread > > which w

Linux kernel thread with Linux 2.6.x

2006-05-29 Thread Laurent Lagrange
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 whic

Linux kernel thread with Linux 2.6.x

2006-05-29 Thread Thiago Galesi
> > 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. You should look into tasklets for this. Not that your system is not OK, but, as you said it, it's not fast enough. N