Re: [RFC][PATCH] irq_work -v2

From: Peter Zijlstra
Date: Fri Jun 25 2010 - 15:47:21 EST


On Fri, 2010-06-25 at 21:30 +0200, Andi Kleen wrote:
> > + entry->next = next_flags(NULL, IRQ_WORK_BUSY);
> > + entry->func(entry);
>
> Needs compiler memory barrier here I think.
>
> > + /*
> > + * 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);
> > + }

Both the (indirect) function call and the cmpxchg imply a compiler
barrier.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/