Re: Unable to schedue bottom halve

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

srinivas bakki wrote:

> i tried flushing the queue in the bottom half using
> flush_workqueue. but this crashes saying .. trying to sleep in the interrupt 
> context !!! whereas the bottom half runs in the context of a kernel thread. any 
> hint of why this scheduling could be failing would be very helpful.
> Thank you for ur patient reading.

AFAIK, bottom halves run in « interrupt context », i.e in_interrupt() is
true while running bottom halves.

Extracts from « Linux Device Drivers » :

  « The Linux kernel has two different mechanisms that may be used to
implement bottom-half processing, both of which were introduced in
Chapter 7. Tasklets are often the preferred mechanism for bottom-half
processing; they are very fast, but all tasklet code must be atomic. The
alternative to tasklets is workqueues, which may have a higher latency
but that are allowed to sleep. »

  « Remember that tasklets are a special function that may be scheduled
to run, in software interrupt context, at a system-determined safe time.»

See http://lwn.net/Kernel/LDD3/.

Sincerly,

Thomas
-- 
Thomas Petazzoni
thomas.petazzoni@xxxxxxxx


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux