doubt on schedule_work() - work task getting scheduled lately
munisekharrms at gmail.com
Fri Jul 29 06:32:25 EDT 2016
I have a doubt regarding the workqueue scheduling.
I am using the workqueue for processing the Rx Interrupt data. I am
calling schedule_work() on receiving the Rx interrupt from hardware.
I calculated the time between calling the schedule_work() and
workqueue task actually getting executed, Here I see many cases of
less than 100 us(It is fairly good).
But sometimes I see 10’s of ms and a lot in the 100’s of ms. I have
seen over 0.5 secs too. I would like to know why does sometimes kernel
takes longer time(in milli seconds) to schedule it? Is there any way
to reduce this time gap?
static void my_workqueuetask(struct work_struct *work)
printk("In %s() \n",__func__);
//Do something here
static irqreturn_t my_irq_handler(int irq, void *dev)
More information about the Kernelnewbies