[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200707231813.26859.ak@suse.de>
Date: Mon, 23 Jul 2007 18:13:26 +0200
From: Andi Kleen <ak@...e.de>
To: Satyam Sharma <ssatyam@....iitk.ac.in>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
David Howells <dhowells@...hat.com>,
Nick Piggin <nickpiggin@...oo.com.au>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 6/8] i386: bitops: Don't mark memory as clobbered unnecessarily
On Monday 23 July 2007 18:05:58 Satyam Sharma wrote:
> From: Satyam Sharma <ssatyam@....iitk.ac.in>
>
> [6/8] i386: bitops: Don't mark memory as clobbered unnecessarily
>
> The goal is to let gcc generate good, beautiful, optimized code.
The first goal is correct code.
The reason for the memory barrier is to prevent other memory references
from being moved over the atomic reference.
e.g. when a bit is used to communicate with another CPU this might be dangerous.
I don't think it's a good idea to remove them. It'll likely introduce subtle
bugs. Atomic bitops tend to be so slow anyways that it doesn't make much
difference.
-Andi
-
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