[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200610311151.33104.dada1@cosmosbay.com>
Date: Tue, 31 Oct 2006 11:51:32 +0100
From: Eric Dumazet <dada1@...mosbay.com>
To: Nick Piggin <nickpiggin@...oo.com.au>, Ingo Molnar <mingo@...e.hu>
Cc: Andrew Morton <akpm@...l.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Jens Axboe <jens.axboe@...cle.com>
Subject: Re: [PATCH] splice : two smp_mb() can be omitted
On Tuesday 31 October 2006 10:40, Nick Piggin wrote:
> Uh, there is nothing that says mutex_unlock or any unlock
> functions contain an implicit smp_mb(). What is given is that the
> lock and unlock obey aquire and release memory ordering,
> respectively.
>
> a = x;
> xxx_unlock
> b = y;
>
> In this situation, the load of y can be executed before that of x.
> And some architectures will even do so (i386 can, because the
> unlock is an unprefixed store; ia64 can, because it uses a release
> barrier in the unlock).
Hum... it seems your mutex_unlock() i386/x86_64 copy is not same as mine :)
Maybe we could document the fact that mutex_{lock|unlock}() has or has not an
implicit smp_mb().
If not, delete smp_mb() calls from include/asm-generic/mutex-dec.h
Ingo ?
Eric
-
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