Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261373AbVAMSZE (ORCPT ); Thu, 13 Jan 2005 13:25:04 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261358AbVAMSXZ (ORCPT ); Thu, 13 Jan 2005 13:23:25 -0500 Received: from omx2-ext.sgi.com ([192.48.171.19]:59341 "EHLO omx2.sgi.com") by vger.kernel.org with ESMTP id S261394AbVAMSRS (ORCPT ); Thu, 13 Jan 2005 13:17:18 -0500 Date: Thu, 13 Jan 2005 10:16:58 -0800 (PST) From: Christoph Lameter X-X-Sender: clameter@schroedinger.engr.sgi.com To: Andi Kleen cc: Nick Piggin , Andrew Morton , torvalds@osdl.org, hugh@veritas.com, linux-mm@kvack.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, benh@kernel.crashing.org Subject: Re: page table lock patch V15 [0/7]: overview In-Reply-To: <20050113180205.GA17600@muc.de> Message-ID: References: <20050112104326.69b99298.akpm@osdl.org> <41E5AFE6.6000509@yahoo.com.au> <20050112153033.6e2e4c6e.akpm@osdl.org> <41E5B7AD.40304@yahoo.com.au> <41E5BC60.3090309@yahoo.com.au> <20050113031807.GA97340@muc.de> <20050113180205.GA17600@muc.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1465 Lines: 30 On Thu, 13 Jan 2005, Andi Kleen wrote: > The rule in i386/x86-64 is that you cannot set the PTE in a non atomic way > when its present bit is set (because the hardware could asynchronously > change bits in the PTE that would get lost). Atomic way means clearing > first and then replacing in an atomic operation. Hmm. I replaced that portion in the swapper with an xchg operation and inspect the result later. Clearing a pte and then setting it to something would open a window for the page fault handler to set up a new pte there since it does not take the page_table_lock. That xchg must be atomic for PAE mode to work then. > This helps you because you shouldn't be looking at the pte anyways > when pte_present is false. When it is not false it is always updated > atomically. so pmd_present, pud_none and pgd_none could be considered atomic even if the pm/u/gd_t is a multi-word entity? In that case the current approach would work for higher level entities and in particular S/390 would be in the clear. But then the issues of replacing multi-word ptes on i386 PAE remain. If no write lock is held on mmap_sem then all writes to pte's must be atomic in order for the get_pte_atomic operation to work reliably. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/