Re: [PATCH 00/18] x86: Ticket lock + cmpxchg cleanup

From: Jeremy Fitzhardinge
Date: Wed Aug 24 2011 - 18:59:09 EST


On 08/24/2011 03:53 PM, Linus Torvalds wrote:
> On Wed, Aug 24, 2011 at 1:10 PM, Jeremy Fitzhardinge <jeremy@xxxxxxxx> wrote:
>> Could we just kill SMP support for OOSTORE machines now? That would be
>> the cleanest possible fix...
> No it wouldn't. The asm version would *still* be cleaner than the "C
> plus random barriers".
>
> It's not like the C version is "portable" in any case.

If there's no need to have a locked instruction, then it could simply be:

barrier();
lock->head++;
barrier();

with no need for asm at all.

J
--
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/