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 AC51CC52D7B for ; Wed, 14 Aug 2024 17:13:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1F9CA6B0095; Wed, 14 Aug 2024 13:13:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1D0B36B0096; Wed, 14 Aug 2024 13:13:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 098B36B0098; Wed, 14 Aug 2024 13:13:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id DB8716B0095 for ; Wed, 14 Aug 2024 13:13:52 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 5B94B1A108D for ; Wed, 14 Aug 2024 17:13:52 +0000 (UTC) X-FDA: 82451498304.25.A7851F0 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf28.hostedemail.com (Postfix) with ESMTP id E43B5C0018 for ; Wed, 14 Aug 2024 17:13:48 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=jMSBkpkE; spf=none (imf28.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1723655595; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=CccF10Y1UVzqVdXNkHG0Q64NFYze/yEsWDqzDzqW7vg=; b=CQZC1+WK0p1JWu9oDEH7HYFXFN3EA+UpGy/nKEPYGbVslaM0qqbDcT1s6nCaiEWkqoA5Ou Qy12P2UBPEZtnGDjKcYalJzRmSCj/tEcbT7rkBkKJhGFIzOP9t0p8n80xEnqqbdHt21+87 vu2um3pwvNvHFbNtM5XHuh0i+3PQxtQ= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=jMSBkpkE; spf=none (imf28.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1723655595; a=rsa-sha256; cv=none; b=isWeU2jrMuHwk9uK+mrDXqFjkFe/aApV45AFKaE7okERnd0qS6q22/owMG9E/ulFq634cA kgLFMo1LbJacNzmqype8d8BhxPll60akMfDvUCdSgamSVnN6JTvx38V3++GAl7qQHzXBAB /VGHMzv9+SGIuZnr2YWrpgmLj4YuhiM= 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=CccF10Y1UVzqVdXNkHG0Q64NFYze/yEsWDqzDzqW7vg=; b=jMSBkpkEqt8WS+F2dp4Vv9k29E uvhexiSRt/j6BZcXWYWhwFZRtiXP6U1lvw1czQiH+KNd72I56m4MYPtsT6fjoLpt5zpYQLn1KJR7V //A13nNRvQuOdUlfQX0zKb1mA9sweTFZhxmoVhdvrLHTy4dtQW1xOoMzDLcm5vc6LlWHvvPRpRVtm kpRvLb8GIfoprE7rCO712liHkEn9FPsoT6qeRz1f+cqBU8GROFhO5kmGFUkcteUQNB60I3VJDJjnc LQoQoyMzpWy5r6yPbdhByxjE2+SCeJzLB2IP5fuzMH37JuKus6pSF5G5VNezNRjd+F8nW5QOzBbuD qVDSrCYg==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1seHYS-00000000ndL-2y8J; Wed, 14 Aug 2024 17:13:00 +0000 Date: Wed, 14 Aug 2024 18:13:00 +0100 From: Matthew Wilcox To: alexs@kernel.org Cc: Will Deacon , "Aneesh Kumar K . V" , Nick Piggin , Peter Zijlstra , Russell King , Catalin Marinas , Brian Cain , WANG Xuerui , Geert Uytterhoeven , Jonas Bonn , Stefan Kristiansson , Stafford Horne , Michael Ellerman , Naveen N Rao , Paul Walmsley , Albert Ou , Thomas Gleixner , Borislav Petkov , Dave Hansen , x86@kernel.org, "H . Peter Anvin" , Andy Lutomirski , Bibo Mao , Baolin Wang , linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-openrisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Sven Schnelle , Qi Zheng , Vishal Moola , "Aneesh Kumar K . V" , Kemeng Shi , Lance Yang , Peter Xu , Barry Song , linux-s390@vger.kernel.org, Guo Ren , Christophe Leroy , Palmer Dabbelt , Mike Rapoport , Oscar Salvador , Alexandre Ghiti , Jisheng Zhang , Samuel Holland , Anup Patel , Josh Poimboeuf , Breno Leitao , Alexander Gordeev , Gerald Schaefer , Hugh Dickins , David Hildenbrand , Ryan Roberts Subject: Re: [RFC PATCH 00/18] use struct ptdesc to replace pgtable_t Message-ID: References: <20240730064712.3714387-1-alexs@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240730064712.3714387-1-alexs@kernel.org> X-Rspamd-Server: rspam03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xFArIlv j82S4wVjk91IRStiznfvo2mBgEhJqt4LashJWBfnkT1svr8NK0NFRb4wXYq4OMELOkivq5x5kzeS2ci9DoXY075Vr/Hf8R+/Oq7Qbu4Jcf3Goy577y/XEkikJg9sig6eAek5ru1Aq6STkt9oRdz6OmnkBusaAUCUs3prGMIPsKYQBhFbVt4O9nBh6NuM4JyWZYwyh7wsJ5esRyU1txM0/cCuqD23wfYhsjRWg2w2pKO9hKEIQFCxinhuSeWMKhNmPvyimD5RQ4+bYdTMnd5URYp5DuEbT/XqlMFUzKWsP9iAxWGI2yhIPGYTEGRKmU4iYjn/AF//0bZXSTWjnddhC2rBuYU2P96Cuyv4RNx1pGazwtze+12fgF8B8L34OlaD/BIt6 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: List-Subscribe: List-Unsubscribe: On Tue, Jul 30, 2024 at 02:46:54PM +0800, alexs@kernel.org wrote: > We have struct ptdesc for page table descriptor a year ago, but it > has no much usages in kernel, while pgtable_t is used widely. Hum, I thought I responded to this to point out the problem, but I don't see the response anywhere, so I'll try again. > The pgtable_t is typedefed as 'pte_t *' in sparc, s390, powerpc and m68k > except SUN3, others archs are all same as 'struct page *'. And there's a very good reason for that. On s390 and powerpc (I cannot speak to the sparc/m68k), each page table is (potentially) smaller than PAGE_SIZE. So we cannot do what your patch purports to do, as we would not know whether we're referring to the first or subsequent page tables contained within a page. Maybe at some point in the distant future we'll be able to allocate a ptdesc per page table instead of per page allocated for use by page tables. But we cannot do that yet.