From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx163.postini.com [74.125.245.163]) by kanga.kvack.org (Postfix) with SMTP id CADEA6B00A0 for ; Wed, 3 Apr 2013 00:25:42 -0400 (EDT) Received: by mail-pa0-f41.google.com with SMTP id kx1so682149pab.28 for ; Tue, 02 Apr 2013 21:25:42 -0700 (PDT) Date: Tue, 2 Apr 2013 21:25:40 -0700 (PDT) From: David Rientjes Subject: Re: [PATCH] mm: prevent mmap_cache race in find_vma() In-Reply-To: <20130403041447.GC4611@cmpxchg.org> Message-ID: References: <3ae9b7e77e8428cfeb34c28ccf4a25708cbea1be.1364938782.git.jstancek@redhat.com> <20130403041447.GC4611@cmpxchg.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Johannes Weiner Cc: Hugh Dickins , Jan Stancek , Paul McKenney , Ian Lance Taylor , linux-mm@kvack.org On Wed, 3 Apr 2013, Johannes Weiner wrote: > The definition of ACCESS_ONCE() relies on gcc's current > implementation, the users of ACCESS_ONCE() only rely on ACCESS_ONCE() > being defined. > > Should it ever break you have to either fix it at the implementation > level or remove/replace the abstraction in its entirety, how does the > individual callsite matter in this case? > As stated, it doesn't. I made the comment "for what it's worth" that ACCESS_ONCE() doesn't do anything to "prevent the compiler from re-fetching" as the changelog insists it does. I'd much rather it refer to gcc's implementation, which we're counting on here, to avoid any confusion since I know a couple people have thought that ACCESS_ONCE() forces the compiler to load memory onto the stack and that belief is completely and utterly wrong. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org