Re: tasklet_action() failure

2007-10-25 Thread Peter Teoh
On 10/24/07, Mohammad M Molla <[EMAIL PROTECTED]> wrote: > Its a bit strange that the passed parameter is not used. > It is not really strange, as THIS particular tasklet_action() is NOT using the parameter passed in, but other tasklet_action() are: ./drivers/misc/lkdtm.c: void jp_tasklet_action(

Re: tasklet_action() failure

2007-10-25 Thread Tony Mouawad
Actually, it's a stock kernel ported to Coldfire. You might classify that as custom. I think that the problem may actually be inside of the FEC driver for the Coldfire CPU. It looks to be that the fec_rx_handler is what's being run from tasklet_action when the problem occurs. The FEC driver is

Re: tasklet_action() failure

2007-10-24 Thread Mohammad M Molla
TASKLET_STATE_SCHED is set when tasklet is scheduled using tasklet_schedule or tasklet_hi_schedule and clear only when the tasklet starts its execution. Are you using some customized kernel or stock kernel? I believe there should not be this bug in stock kernel. - Meraj Tony Mouawad <[EMAIL P

Re: tasklet_action() failure

2007-10-24 Thread Tony Mouawad
Very good. Now I'm trying to figure out why this tasklet_action() code path ends up calling BUG(). This is a very intermittent problem and seemingly impossible to reproduce. 404 if(!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state)) 405 BUG(); It's obvious that 404 will result in

Re: tasklet_action() failure

2007-10-23 Thread Mohammad M Molla
Its a bit strange that the passed parameter is not used. Looking carefully at the code what I understood is, inside the while loop, tasklets are processed one by one from the temporary list. Look at the continue, which actually skips the last part of the loop. Whenver, tasklet_trylock fails, befo

Re: tasklet_action() failure

2007-10-23 Thread Wenhua Zhao
On 10/23/07, Tony Mouawad <[EMAIL PROTECTED]> wrote: > How does the list in __get_cpu_var(tasklet_vec).list get populated? > It looks like at the top of the tasklet_action() call the list is set > to empty and at the bottom __get_cpu_var(tasklet_vec).list is assigned > to the next element of a temp

Re: tasklet_action() failure

2007-10-23 Thread Tony Mouawad
What is the purpose of the parameter "struct softirq_action *a" being passed into tasklet_action() since it doesn't appear to be used anywhere in the function? How does the list in __get_cpu_var(tasklet_vec).list get populated? It looks like at the top of the tasklet_action() call the list is set

Re: tasklet_action() failure

2007-10-23 Thread Mohammad M Molla
it calls BUG() handler. Otherwise it skips line 405 and calls tasklet handler. - Meraj - Original Message From: Tony Mouawad <[EMAIL PROTECTED]> To: kernelnewbies Sent: Monday, October 22, 2007 5:19:05 PM Subject: tasklet_action() failure Hello, I'm trying to get a handl

Re: tasklet_action() failure

2007-10-22 Thread Mohammad M Molla
tasklet_action is called for handling tasklets that have already been scheduled. So for these tasklets t->state should have TASKLET_STATE_SCHED bit set. In line 404, test_and_clear_bit clears TASKLET_STATE_SCHED bit and returns the old value of that bit. If it returns 0, that means a bug, so i

tasklet_action() failure

2007-10-22 Thread Tony Mouawad
Hello, I'm trying to get a handle on a problem that is occuring inside of a call to tasklet_action(). Can someone explain a bit about what line 404 is doing ( and the function itself ) in the following code? It seems that the OS is intermittently resulting in a false result on line 404 and then