[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1289927326.2109.631.camel@laptop>
Date: Tue, 16 Nov 2010 18:08:46 +0100
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: "Aguirre, Sergio" <saaguirre@...com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Huang Ying <ying.huang@...el.com>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
Ingo Molnar <mingo@...e.hu>, Kyle McMartin <kyle@...artin.ca>
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists