Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933404Ab0GOOfY (ORCPT ); Thu, 15 Jul 2010 10:35:24 -0400 Received: from one.firstfloor.org ([213.235.205.2]:43755 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933393Ab0GOOfV (ORCPT ); Thu, 15 Jul 2010 10:35:21 -0400 Date: Thu, 15 Jul 2010 16:35:18 +0200 From: Andi Kleen To: Frederic Weisbecker Cc: Linus Torvalds , Mathieu Desnoyers , Andi Kleen , Ingo Molnar , LKML , Andrew Morton , Peter Zijlstra , Steven Rostedt , Steven Rostedt , Thomas Gleixner , Christoph Hellwig , Li Zefan , Lai Jiangshan , Johannes Berg , Masami Hiramatsu , Arnaldo Carvalho de Melo , Tom Zanussi , KOSAKI Motohiro , "H. Peter Anvin" , Jeremy Fitzhardinge , "Frank Ch. Eigler" , Tejun Heo Subject: Re: [patch 1/2] x86_64 page fault NMI-safe Message-ID: <20100715143518.GA18038@basil.fritz.box> References: <20100714170617.GB4955@Krystal> <20100714184642.GA9728@elte.hu> <20100714195617.GC22373@basil.fritz.box> <20100714200552.GA22096@Krystal> <20100714223116.GB14533@nowhere> <20100715141118.GA6417@nowhere> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100715141118.GA6417@nowhere> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1118 Lines: 27 > But then how did the previous tasks get this new mapping? You said > we don't walk through every process page tables for vmalloc. No because those are always shared for the kernel and have been filled in for init_mm. Also most updates only update the lower tables anyways, top level updates are extremly rare. In fact on PAE36 they should only happen at most once, if at all, and most likely at early boot anyways where you only have a single task. On x86-64 they will only happen once every 512GB of vmalloc. So for most systems also at most once at early boot. > > I would understand this race if we were to walk on every processes page > tables and add the new mapping on them, but we missed one new task that > forked or so, because we didn't lock (or just rcu). The new task will always get a copy of the reference init_mm, which was already updated. -Andi -- 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/