Hi I have a query regarding the difference between request_irq and request_threaded_irq. I am aware that the thread_fn_handler may sleep, allocate memory, acquire locks etc. What context does the thread fn passed to the request_threaded_irq run in ? TIA -- ~/asd
Hi Asutosh .. How r u doing ............ I hope below will clear .. or for more detail http://lwn.net/Articles/302043/ 1. threaded interrupt handlers Benifits: a) Reduce latency b) reduce locking between hard and soft part. 1. threaded interrupt handlers Benifits: a) Reduce latency b) reduce locking between hard and soft part. Threaded interrupt handlers reduce that work even further, so the top half would consist of a "quick check handler" that just ensures the interrupt is from the device; if so, it simply acknowledges the interrupt to the hardware and tells the kernel to wake the interrupt handler thread On Wed, Jan 25, 2012 at 10:15 AM, Asutosh Das <das.asutosh@gmail.com> wrote:
Hi I have a query regarding the difference between request_irq and request_threaded_irq. I am aware that the thread_fn_handler may sleep, allocate memory, acquire locks etc.
What context does the thread fn passed to the request_threaded_irq run in ?
TIA
-- ~/asd
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
On Wed, Jan 25, 2012 at 5:45 AM, Asutosh Das <das.asutosh@gmail.com> wrote:
Hi I have a query regarding the difference between request_irq and request_threaded_irq. I am aware that the thread_fn_handler may sleep, allocate memory, acquire locks etc.
What context does the thread fn passed to the request_threaded_irq run in ?
TIA
-- ~/asd
It runs in process context not in interrupt context. It is a normal kernel thread. That is why as you said it can sleep (since it can be schedule again), can allocate any time of memory (even if this operations leads to a sleep) and acquire locks (which also makes the process sleep if it fails to do it). Best regards, -- Javier MartÃnez Canillas (+34) 682 39 81 69 Barcelona, Spain
participants (3)
-
Asutosh Das -
Javier Martinez Canillas -
naveen yadav