Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp515535ybt; Fri, 26 Jun 2020 05:12:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZ7zEsO5lVxDwa3F6tWRxrVgm4yol3OBWiaQ9aqzHljwnxqI9UQFJ8yfECPWj3nFHBlS2M X-Received: by 2002:a05:6402:1605:: with SMTP id f5mr3241597edv.8.1593173564831; Fri, 26 Jun 2020 05:12:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593173564; cv=none; d=google.com; s=arc-20160816; b=mpYnoveei66NAooBtIcX7MKyJ0GrvnsaQXgfHh2/kqQ8s1cvKeP5+M7QC94vXYj0zc YOpGUkWEfMZ0gu70mNDmUeia4/FBe40Y6wWC0wyvrrIXmCO5slreIAJVJ68QXndjGJua /mKEortlngRh2H0SUpOXF/sJepVRcXB6/JRTEukEu9SYMTJt+R1yM9AiW3Iyu1BnI5zz +Qq6RjbSRijB77XVR/22sZRmbwoq5WNGte77D0n3YNEdq02G6g75xKOh/tlAYF1Q1UPO vZFarrLktLdJaPlfSViWym6UzMsgmSFIgxmcdaarSPKBMpNk54GVxpPkzFw901r+ymvD 0QAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ePLLvn3g4STvMdY6WpJ5BftJMQVL6KUjzTUZoL0oc+M=; b=nJ9f7IPjZaXD3NrHHXsd4QtOXFvAAKKV2r/NSRiS2OxbgrollU3PxnwgMt1lJ5/Qq1 HmhhZ6ujStDMvRyMZ12EGutVHrKPXZZrsBCudjpwqUPD5F0Ca5TmwSLtZXpYM+EYnJL0 dsklYl5y9kwzexW3YYevN0PEpHP9Lh6+Xwt4Gyv+7itIz3XVqzxJv2fTsYDxy1hoMKt0 MQ37CT1j82UMFMTEUY2ot+Ct//nF2LtcUd/SYTlB7kdbRm/fpIWmuBX+3kNeBdLGjDKU WW/8LqgI+KyE+fVr0Z2CkuRX4CB+s175Zzei/cF0gsfS3AjmKtp1EOGYzninN3cLpcVi mlAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=RUL1JawB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b15si4276916edt.394.2020.06.26.05.12.21; Fri, 26 Jun 2020 05:12:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=RUL1JawB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728322AbgFZLIP (ORCPT + 99 others); Fri, 26 Jun 2020 07:08:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728232AbgFZLIP (ORCPT ); Fri, 26 Jun 2020 07:08:15 -0400 Received: from casper.infradead.org (unknown [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26518C08C5C1 for ; Fri, 26 Jun 2020 04:08:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ePLLvn3g4STvMdY6WpJ5BftJMQVL6KUjzTUZoL0oc+M=; b=RUL1JawBO+l23qmfT02FPmoWAp tMzPzy2tHXhTaqOnBNg5PoGPK8XREfCJmYdDYFvM07zI8LwTH1D/O2z2q02Orb3dMyVbUDhAZeiQf l+6uG231lJ4rrYmo7LXFbc3/YiNwTnO/r2pXEmVkJKuu73pGDiyoFYBVI6qH1LKBFPIWU4y5HJado iAQWXtINr/7dHNys57uXxDXGeCqjgRMtNAHQ8qA05+a5dTbBkqpbwncx48E0nvWffbIjiacHr1Vhs 6DXBiG49zvHSYa5TSxffiERcgqTiNp6BzI8bpU0dAcJhHQvw8yIvOFSGDSg4rnJmoCCf9TyUl1sme tRaKkZ9g==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jomCi-0005mc-8q; Fri, 26 Jun 2020 11:07:34 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 7D7513007CD; Fri, 26 Jun 2020 13:07:31 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 69B8029C4228B; Fri, 26 Jun 2020 13:07:31 +0200 (CEST) Date: Fri, 26 Jun 2020 13:07:31 +0200 From: Peter Zijlstra To: Joerg Roedel Cc: x86@kernel.org, hpa@zytor.com, Dave Hansen , Andy Lutomirski , Andrew Morton , Steven Rostedt , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Joerg Roedel Subject: Re: [PATCH] x86/mm: Pre-allocate p4d/pud pages for vmalloc area Message-ID: <20200626110731.GC4817@hirez.programming.kicks-ass.net> References: <20200626093450.27741-1-joro@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200626093450.27741-1-joro@8bytes.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 26, 2020 at 11:34:50AM +0200, Joerg Roedel wrote: > From: Joerg Roedel > > Pre-allocate the page-table pages for the vmalloc area at the level > which needs synchronization on x86. This is P4D for 5-level and PUD > for 4-level paging. > > Doing this at boot makes sure all page-tables in the system have these > pages already and do not need to be synchronized at runtime. The > runtime synchronizatin takes the pgd_lock and iterates over all > page-tables in the system, so it can take quite long and is better > avoided. > > Signed-off-by: Joerg Roedel > --- Can't we now remove arch_sync_kernel_mappings() from this same file?