Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1024485pxv; Thu, 15 Jul 2021 23:12:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyM/sn93dEy6zpkTrvEWR2mE3V0HMud+jyDTHtWJ/i0pfK9dlDOisXWgMeJYaVn7x7Oz/wu X-Received: by 2002:aa7:d3cd:: with SMTP id o13mr6344141edr.149.1626415937952; Thu, 15 Jul 2021 23:12:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626415937; cv=none; d=google.com; s=arc-20160816; b=t6aKKII0eqs9qi+vDEfmtu31e/W2CmaYCF23iXCwHlnAoG71T1Ze4fWw/oCwXJ/iTJ pzacShzClqS1n3QjuqucR8m4tOilSn8jCNfGIjbRwnVmhhlbiTjT4lm/mYhc8V0A7bx6 8JK6GXx+ryJbN4Hphi3iAxOKiufOZnHfJYCGO55ZCj7W2zCU0JrDk7i36s2eAPyVFh+K oy3uClSoG3udZWAj4JWHlmaaQrOZz0uAV44uivSvYynDnONmC/CQ9g7ff7nRysbnA0KU ixZ0j+Ql3+Mzx2kaJZB+kvc9xXgE3CwbGL36aKrIYDvxDMMd7wZnIvHUlYga3mOfMG02 9u5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=HkvTd5iaIk2sznDHmB0qT1piFPtlRiXutiCKn07Cliw=; b=ckbbkbC5aANwiP+2Q3Bb9KuERfHEQacrWyEkuYoM6SvxnAzj7TJt8w/1tqZFbprd/m jmTFixjGc1in/vJjEBerRdcaAJj7LlDlDb0Q4tnYE7B84S3JDjwMaewuIkxNnSYhCIcf y21usRFmsFErHr3uDPb2nZ/RowxqZEQQ4Mxh7beznpIpeusVf10ERb65BQRPcgTc1ZVd xbo56WvOxVHM1NKnpkmV3saMLDwoN3V7qghSAgqZ8TGYVc8oZ6bCkkL3An3+ZTconrZq kfCjwf6ugSiGiVwmMzO1peKesMzAOiDkFC6AbI2DRulgWFX+ajTwc1O5WPLbmyiLCfdL rLIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hGEWMRCo; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id eu9si9882592ejc.117.2021.07.15.23.11.52; Thu, 15 Jul 2021 23:12:17 -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=pass header.i=@gmail.com header.s=20161025 header.b=hGEWMRCo; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234457AbhGPGNA (ORCPT + 99 others); Fri, 16 Jul 2021 02:13:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234160AbhGPGM7 (ORCPT ); Fri, 16 Jul 2021 02:12:59 -0400 Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BF4BC06175F; Thu, 15 Jul 2021 23:10:04 -0700 (PDT) Received: by mail-qk1-x734.google.com with SMTP id 77so7651055qkk.11; Thu, 15 Jul 2021 23:10:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=HkvTd5iaIk2sznDHmB0qT1piFPtlRiXutiCKn07Cliw=; b=hGEWMRCoK0tYN0OHIdja7INAL5BRsZO1/CJW7miWVlFa8DghO7aXJcLZFFb9m+x9lr FZ7Hnbi0FQPfKu2VdUTkhUwk21bVtCMLIhUKIJm1uCaqQmE/9CZYQ37T7eGuHZARGYZ/ ifIpl6i/LuZqrpl27GRqjm03R8h+DJu29PJtzGe/qLOrsZ/fDpuwLzSihZO4Rsbiau+B PXrBLPi3t9zZIwOoAhKxkmlqkh3KbjJ5zCbSI2ttZi8pCqCYQGf+fdIER+HTrJ2ir8Ee 6aHY7havqp/y7+uiSmxH7UaOFLE5+FtyhJv37MdIvyyKMKOnGFCMSvbent0i/9yCKVLn OISg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=HkvTd5iaIk2sznDHmB0qT1piFPtlRiXutiCKn07Cliw=; b=A/MAjk2XWVu/lnuyl33QLPNl7VJwxkkZiejp/gNB4hCH4yzcfleV+3+BVOFipqUpHv ugYdBMbEuIBUZUygkU8JcbD80N31oQ7prQNgsDfvEqnzK6FwBCzqDkSNkJ4nWw5ITz/o WSV8115e1XG4Dl7X98HQot1+ABS0XRZXjtUJz7TEjGjnfj0Gi/V76Hj530GhcC3epDgE +ZkdmTY47coeuKdaxH9WtsDegHjepEsxMrNoc45mJD0Jpf5pOk9gOSdEJhPaWnX5tD6d ytKR3Ch+AfSqvUGd1gtPDMExmP+xUHsU5B9jYITAzoV0hplYl6fYycwQ0iPVQT3G1WgV 01Bg== X-Gm-Message-State: AOAM531L6XKrKHicBHmTGfd/7QQus+KsVyWj0xBygEmwwxTnfzO776J6 0gSD+kZZggEkbKNbyeYtYA== X-Received: by 2002:a37:45cf:: with SMTP id s198mr8045552qka.267.1626415803783; Thu, 15 Jul 2021 23:10:03 -0700 (PDT) Received: from PWN (104-9-124-193.lightspeed.sntcca.sbcglobal.net. [104.9.124.193]) by smtp.gmail.com with ESMTPSA id f1sm3481330qkh.75.2021.07.15.23.10.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jul 2021 23:10:03 -0700 (PDT) Date: Fri, 16 Jul 2021 02:09:58 -0400 From: Peilin Ye To: x86@kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Jonathan Corbet Cc: "H. Peter Anvin" , Joerg Roedel , Cong Wang , Zefang Han , Wei Lin Chang , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH] docs: x86: Remove obsolete information about x86_64 vmalloc() faulting Message-ID: <20210716060958.GA2197@PWN> References: <20210622031910.141262-1-yepeilin.cs@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210622031910.141262-1-yepeilin.cs@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, > diff --git a/Documentation/x86/x86_64/mm.rst b/Documentation/x86/x86_64/mm.rst > index ede1875719fb..9798676bb0bf 100644 > --- a/Documentation/x86/x86_64/mm.rst > +++ b/Documentation/x86/x86_64/mm.rst > @@ -140,10 +140,6 @@ The direct mapping covers all memory in the system up to the highest > memory address (this means in some cases it can also include PCI memory > holes). > > -vmalloc space is lazily synchronized into the different PML4/PML5 pages of > -the processes using the page fault handler, with init_top_pgt as > -reference. This information is out-of-date, and it took me quite some time of ftrace'ing before I figured it out... I think it would be beneficial to update, or at least remove it. As a proof that I understand what I am talking about, on my x86_64 box: 1. I allocated a vmalloc() area containing linear address `addr`; 2. I manually pagewalked `addr` in different page tables, including `init_mm.pgd`; 3. The corresponding PGD entries for `addr` in different page tables, they all immediately pointed at the same PUD table (my box uses 4-level paging), at the same physical address; 4. No "lazy synchronization" via page fault handling happened at all, since it is the same PUD table pre-allocated by preallocate_vmalloc_pages() during boot time. Commit 6eb82f994026 ("x86/mm: Pre-allocate P4D/PUD pages for vmalloc area") documented this clearly: """ Doing this at boot makes sure no synchronization of that area is necessary at runtime. """ Should we remove this sentence, or update it? Any ideas? Sincerely, Peilin Ye