From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S268501AbUHWXjL (ORCPT ); Mon, 23 Aug 2004 19:39:11 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S268084AbUHWXhu (ORCPT ); Mon, 23 Aug 2004 19:37:50 -0400 Received: from adsl-209-204-138-32.sonic.net ([209.204.138.32]:7344 "EHLO server.home") by vger.kernel.org with ESMTP id S268520AbUHWXfx (ORCPT ); Mon, 23 Aug 2004 19:35:53 -0400 Date: Mon, 23 Aug 2004 16:35:12 -0700 (PDT) From: Christoph Lameter X-X-Sender: christoph@server.home To: Rajesh Venkatasubramanian cc: William Lee Irwin III , Hugh Dickins , "David S. Miller" , raybry@sgi.com, ak@muc.de, benh@kernel.crashing.org, manfred@colorfullife.com, linux-ia64@vger.kernel.org, LKML Subject: Re: page fault fastpath patch v2: fix race conditions, stats for 8,32 and 512 cpu SMP In-Reply-To: Message-ID: References: <2uexw-1Nn-1@gated-at.bofh.it> <2uCTq-2wa-55@gated-at.bofh.it> <20040819000151.GU11200@holomorphy.com> <20040819002038.GW11200@holomorphy.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Score: -4.9 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 23 Aug 2004, Rajesh Venkatasubramanian wrote: > So there are no other active thread (mm_user) other than the current > exit_mmap() thread. This gives thread exclusion. So we don't need > mm->mmap_sem. > > However, we have to lock out truncate()->zap_pmd_range(), rmap.c > functions, and other places from walking the page tables while we > are freeing the page tables in exit_mmap(). The page_table_lock in > exit_mmap() provides that exclusion. > > That's my understanding. Correct me if I am wrong. Correct. I just looked through the function and it unlinks the pgd before unlocking page_table_lock. It frees the pgd tree content later. Since no mm_user is active anymore no pte ops occur and therefore also atomic pte operations do not need protection.