lkml.org 
[lkml]   [2011]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] genirq: Flush the irq thread on synchronization
On Wed, 7 Dec 2011, Ido Yariv wrote:

> Hi Thomas,
>
> On Mon, Dec 05, 2011 at 10:55:01PM +0100, Thomas Gleixner wrote:
> > Does the following (untested) patch solve your issues?
>
> I briefly tested this patch and it appears to also solve the issues I
> mentioned.
>
> I think both solutions would work. The only drawbacks I see in using
> this patch over the other one are that this patch involves a bit more
> locking in synchronize_irq() and irq_finalize_oneshot() (for non-oneshot
> irqs), and that the oneshot mechanism is used for non-oneshot threads.

I don't care about synchronize_irq() at all. It's a slow path anyway.

The extra burden in irq_finalize_oneshot() is somewhat of a concern,
but that locks should be completely uncontended for real threaded irq
users, so in practice it's a non issue.

It's the only solution which actually solves the thread_active leak,
though I just discovered a very narrow race window between the
test_and_clear_bit and the active increment, which is easy to
fix. I'll send out another version tomorrow

Thanks,

tglx


\
 
 \ /
  Last update: 2011-12-07 01:51    [W:1.288 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site