title: Clarification about the behaviour of request_threaded_irq
body: <p>I have scoured the web, but haven't found a convincing answer to a couple of related questions I have, with regard to the "request_threaded_irq" feature.</p>
  
  <p><strong>Question1:</strong>
  Firstly, I was reading this article, regarding threaded IRQ's:</p>
  
  <p><a href="http://lwn.net/Articles/302043/" rel="noreferrer">http://lwn.net/Articles/302043/</a></p>
  
  <p>and there is this one line that isn't clear to me:</p>
  
  <p>"Converting an interrupt to threaded makes only sense when the handler
   code takes advantage of it by integrating tasklet/softirq
   functionality and simplifying the locking."</p>
  
  <p>I understand had we gone ahead with a "traditional", top half/bottom half approach, we would have needed either spin-locks or disable local IRQ to meddle with shared data. But, what I don't understand is, how would threaded interrupts simplify the need for locking by integrating tasklet/softirq functionality.</p>
  
  <p><strong>Question2:</strong> 
  Secondly, what advantage (if any), does a request_threaded_handler approach have over a work_queue based bottom half approach ? In both cases it seems, as though the "work" is deferred to a dedicated thread. So, what is the difference ?</p>
  
  <p><strong>Question3:</strong> 
  Lastly, in the following prototype:</p>
  
  <pre><code>int request_threaded_irq(unsigned int irq, irq_handler_t handler, irq_handler_t thread_fn, unsigned long irqflags, const char *devname, void *dev_id)
  </code></pre>
  
  <p>Is it possible that the "handler" part of the IRQ is continuously triggered by the relevant IRQ (say a UART receving characters at a high rate), even while the "thread_fn"(writing rx'd bytes to a circular buffer) part of the interrupt handler is busy processing IRQ's from previous wakeups ? So, wouldn't the handler be trying to "wakeup" an already running "thread_fn" ? How would the running irq thread_fn behave in that case ?</p>
  
  <p>I would really appreciate if someone can help me understand this.</p>
  
  <p>Thanks,
   vj</p>