[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.1.00.0804021505160.14670@woody.linux-foundation.org>
Date: Wed, 2 Apr 2008 15:07:22 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Andrew Morton <akpm@...ux-foundation.org>
cc: mikulas@...ax.karlin.mff.cuni.cz, viro@...iv.linux.org.uk,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH]: Fix SMP-reordering race in mark_buffer_dirty
On Wed, 2 Apr 2008, Andrew Morton wrote:
>
> But then the test-and-set of an already-set flag would newly cause the
> cacheline to be dirtied, requiring additional bus usage to write it back?
>
> The CPU's test-and-set-bit operation could of course optimise that away in
> this case. But does it?
No, afaik no current x86 uarch will optimize away the write on a locked
instuction if it turns out to be unnecessary.
Can somebody find a timing reason to have the ugly code?
Linus
--
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