[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20091102180959.GC10072@lenovo>
Date: Mon, 2 Nov 2009 21:09:59 +0300
From: Cyrill Gorcunov <gorcunov@...il.com>
To: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Nick Piggin <npiggin@...e.de>, Ingo Molnar <mingo@...e.hu>
Subject: Re: [patch][rfc] x86, mutex: non-atomic unlock (and a rant)
[Cyrill Gorcunov - Mon, Nov 02, 2009 at 07:46:26PM +0300]
|
| The other option could be that we put two mem-write operations
| like
| int tmp;
| atomic_set(&lock->count, 1);
| tmp = lock->waiters;
| rmb();
| lock->waiters = tmp;
| if (unlikely(lock->waiters))
| fail_fn(lock);
|
| Which should work faster then cpuid (and we have to be sure somehow
| that gcc doesn't suppress this redundant operations).
|
And which has nothing to do with OoO mem-read, and wouldn't
work. Sorry for noise.
-- Cyrill
--
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