lkml.org 
[lkml]   [2010]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [RFC][PATCH] irq_work: Don't ignore possible cmpxchg failure


> -----Original Message-----
> From: Peter Zijlstra [mailto:a.p.zijlstra@chello.nl]
> Sent: Tuesday, November 16, 2010 11:09 AM
> To: Aguirre, Sergio
> Cc: LKML; Huang Ying; Martin Schwidefsky; Ingo Molnar; Kyle McMartin
> Subject: RE: [RFC][PATCH] irq_work: Don't ignore possible cmpxchg failure
>
> On Tue, 2010-11-16 at 10:57 -0600, Aguirre, Sergio wrote:
>
> > > > @@ -145,7 +145,10 @@ void irq_work_run(void)
> > > > * Clear the BUSY bit and return to the free state if
> > > > * no-one else claimed it meanwhile.
> > > > */
> > > > - cmpxchg(&entry->next, next_flags(NULL, IRQ_WORK_BUSY),
> NULL);
> > > > + xchgres = cmpxchg(&entry->next,
> > > > + next_flags(NULL, IRQ_WORK_BUSY),
> > > > + NULL);
> > > > + BUG_ON(unlikely(xchgres != next_flags(NULL,
> IRQ_WORK_BUSY)));
> > >
> > > simply adding (void) in front would be much easier.
> >
> > But isn't that still leaving the remote possibility of a hidden cmpxchg
> > Failure open?
>
> No, we don't care if it fails, read the comment. All we want to know is
> that if it still matched, we flipped the bit.

I understand. Will add just a (void) typecast, and resend then.

Regards,
Sergio


\
 
 \ /
  Last update: 2010-11-16 18:15    [W:0.037 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site