From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BBAAC7EE25 for ; Fri, 9 Jun 2023 16:37:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 09C256B0078; Fri, 9 Jun 2023 12:37:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 04CD28E0005; Fri, 9 Jun 2023 12:37:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E7ECE8E0003; Fri, 9 Jun 2023 12:37:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id D9D9E6B0078 for ; Fri, 9 Jun 2023 12:37:41 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id A754BC0307 for ; Fri, 9 Jun 2023 16:37:41 +0000 (UTC) X-FDA: 80883765522.15.A8863F5 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by imf02.hostedemail.com (Postfix) with ESMTP id 6C7518001C for ; Fri, 9 Jun 2023 16:37:38 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf02.hostedemail.com: domain of jonathan.cameron@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1686328659; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4HahQ4flh3fCB+oIU+NQP/x3CAQFc/doCL1B7dcusu0=; b=x3X+UKR9PaNPTINz2vqDQXH41YJyn6YCcs56TmQirFUFqlKbPVtRu64CQkedZKpZpgS43J yJN06QTXU1J2K9A1kCUqrfyPpJJ6RKKOt19VJJhdKhkPnh7NEMJEQ4st4JT7MuVfA7T74S SFhcK3+oXvIOUdbj4V3hvm/h8OmwpMw= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf02.hostedemail.com: domain of jonathan.cameron@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686328659; a=rsa-sha256; cv=none; b=Xg2Lm3yUdFude8xPr9wp/SHSXlQPa8uffpuDofgmYkpcmp3GZ/o4AuTUPlBmXbqxAhNsPR EKk+MBE09qTpquN+cEdbep8DjqgecdgmRsUJtTTK6OQyHwL+vnvSN9QZVwMDgNiRfkW7WS 3pZQHL2TqD/vBcSvvze+le15M57+Quw= Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Qd6BZ5nM7z67KPG; Sat, 10 Jun 2023 00:35:18 +0800 (CST) Received: from localhost (10.126.170.42) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Fri, 9 Jun 2023 17:37:26 +0100 Date: Fri, 9 Jun 2023 17:37:23 +0100 From: Jonathan Cameron To: Linus Walleij CC: Andrew Morton , Jonathan Corbet , , , "Matthew Wilcox" , Randy Dunlap , "Mike Rapoport" Subject: Re: [PATCH v3] Documentation/mm: Initial page table documentation Message-ID: <20230609173723.0000520a@Huawei.com> In-Reply-To: <20230608125501.3960093-1-linus.walleij@linaro.org> References: <20230608125501.3960093-1-linus.walleij@linaro.org> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.126.170.42] X-ClientProxiedBy: lhrpeml100001.china.huawei.com (7.191.160.183) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 6C7518001C X-Stat-Signature: zzoby7n1mwneyeoc7kyhzbiq7u4tw9hm X-Rspam-User: X-HE-Tag: 1686328658-413232 X-HE-Meta: U2FsdGVkX19qwNzBWd6OswdMvea1ruV66AkN7j+BGSkvmQBopGMwYpDfGIirIGJ94zWeOlO8pHELCfp5Sx3k8q2QQ4SSDldttKjjMhKjMAWYkcYC2QAJWE+POVz0SBYSfnDKbc+kelWdMe97mg5Ayo/9SEkOCCnkIL1KXpInBpnVFf6CoGGEnk4r9n0VAXmQGVhNdxJ+PUjf9UgpGLwMf6KSfBaGSJzCmCRAX84Y1tUCr4aS/uiu/MfN4zAuh1Jt+mWpL75Lj/WE4S6MY50GYtKjrnLycqe3dvkV7h/AB0wgb+MED8rR0Gr2CyF1h5P9zXxFwQc+8lZKPzQkWCHVRrbsSexzlzt8vY9qWAFBbf6jntYE37hGHEgKsRjkf0qo+H3b/VbEfy27A1/enFuU7Guml/sLxyEPtXIVXm8ksGrfqmnQDCynkjoD3WBQYnX/1ygSH8VNoKHp6R/lBl4gNtulheaX0hYie6luRoSw4uV0URmTxx5VYoXGCnaO38rBY9RQyXrwGOjrCNgYM8sYXTM7thD0xJ+T29E3PCPo5d0NnfPgZK1e1UIyrcXmoh1p3AUTUbRXAPdQjAHUHI3FA6yg2SmyQFazqM/tD4L/XkDXAyAlHkv1cAuyQgzPxX/SqV34oTrxAJ/GpF1VI3yOFSWE/SOEsqQCDakF0ByUJEw6mGu1j6BE/UBqmbR+YQbkNIEzpFtBc9h8NhTTkYlzlpMUxlczZd9IxbeRT8ixuWACn+KRMoM7BQD2yvTdSkiNH4bUnylzDTKxWTDOwfkg08ZRrVgdrFeqSt72rh+ZoxhE5sEu1uIIzihWoPiYII9oHKvhdGtUPpniKqWHDNYI7W13bIn0ChJpIeamoTWih7AB1ltUGU7/QaYNQILcCW+iXu/FwMRkZwAf4oIIgciIr7Mou6p/+zU45sZ29tjQoYsJ0pOidix7MmR/J93AVw/c5cwMrbrcJ7wimsZRJV+ 09AoXgVM yXTtj2dKC8S6WuWO26rfh7e6JrOxMp7I2qGbQjwXqnzTKwaRH8M7CkgoxJzqZqeMmMiCCodRyobqsbcF23Hn02VLOWGRNKbpANrsUjRkTnjHU8eUQPvdngjkxRQ3/ExE8Iw+sshz7VXmWsBN0gWQQxCMXZbseDNvXvuVQGhhpBGgFrHjvYxANtME0GAuR3kyZ6tfbf9W/pkO9OY4mXAz1qjjCI1z8355NXEVRw7MYInK5v3CFTy8AU/7G8eh1xvv0xpxK9CSCUONcdq2y7OR1wQBfzX7RrWRKy6xUJKn5F3az5P0i7jThjq9Va7wFCjrpQIjCE6MM/XDn4g2HCHmanxOzeZnyLq2uaC/iIU9uAZ946bcyauXttyzJtszAHcZPxjZI5Yi40FFXjJULP1aOPDDEBQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, 8 Jun 2023 14:55:01 +0200 Linus Walleij wrote: > This is based on an earlier blog post at people.kernel.org, > it describes the concepts about page tables that were hardest > for me to grasp when dealing with them for the first time, > such as the prevalent three-letter acronyms pfn, pgd, p4d, > pud, pmd and pte. > > I don't know if this is what people want, but it's what I would > have wanted. > > I discussed at one point with Mike Rapoport to bring this into > the kernel documentation, so here is a small proposal. > > Cc: Matthew Wilcox > Cc: Randy Dunlap > Cc: Mike Rapoport > Link: https://people.kernel.org/linusw/arm32-page-tables > Signed-off-by: Linus Walleij Hi Linus, Reads nicely and seems like a good introduction to me. One very trivial comment but otherwise FWIW Reviewed-by: Jonathan Cameron > + > +Over time a deeper hierarchy has been developed in response to increasing memory > +sizes. When Linux was created, 4KB pages and a single page table called > +`swapper_pg_dir` with 1024 entries was used, covering 4MB which coincided with > +the fact that Torvald's first computer had 4MB of physical memory. Entries in > +this single table was referred to as *PTE*:s - page table entries. table were referred to as (entries is plural hence were rather than was) > + > +The hierarchy reflects the fact that page table hardware has become hierarchical