From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from extu-mxob-1.symantec.com (extu-mxob-1.symantec.com [216.10.194.28]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "extu-mxob-1.symantec.com", Issuer "VeriSign Trust Network" (not verified)) by ozlabs.org (Postfix) with ESMTP id 2AA99DDE28 for ; Wed, 23 May 2007 14:04:17 +1000 (EST) Date: Wed, 23 May 2007 05:03:38 +0100 (BST) From: Hugh Dickins To: Benjamin Herrenschmidt Subject: Re: [PATCH/RFC] Rework ptep_set_access_flags and fix sun4c In-Reply-To: <1179874748.32247.868.camel@localhost.localdomain> Message-ID: References: <20070509231937.ea254c26.akpm@linux-foundation.org> <1178778583.14928.210.camel@localhost.localdomain> <20070510.001234.126579706.davem@davemloft.net> <1179176845.32247.107.camel@localhost.localdomain> <1179212184.32247.163.camel@localhost.localdomain> <1179757647.6254.235.camel@localhost.localdomain> <1179815339.32247.799.camel@localhost.localdomain> <1179874748.32247.868.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: mark@mtfhpc.demon.co.uk, linux-mm@kvack.org, wli@holomorphy.com, linuxppc-dev@ozlabs.org, andrea@suse.de, "Tom \"spot\" Callaway" , sparclinux@vger.kernel.org, akpm@linux-foundation.org, David Miller List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, 23 May 2007, Benjamin Herrenschmidt wrote: > > > Would the "__changed && __dirty" architectures (x86, x86_64, ia64) > > be better off saying __changed = __dirty && pte_same? I doubt it's > > worth bothering about. > > I'd say let gcc figure it out :-) No, I wasn't meaning the optimization, but the significance of the boolean __changed that's returned. If ptep_set_access_flags does not change the pte (because !dirty or !safely_writable or whatever that arch calls it), then ideally it ought to return false. But it doesn't affect correctness if it sometimes says true not false, and these arches happen to have an empty update_mmu_cache (with lazy_mmu_prot_update currently under separate review), and what you have follows what was already being done, and sun4c already has to "lie": so it's rather theoretical. Hugh