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 BC415C4167B for ; Tue, 28 Nov 2023 04:05:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 33FFE6B02F6; Mon, 27 Nov 2023 23:05:57 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2C8E86B02F7; Mon, 27 Nov 2023 23:05:57 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 169976B02F8; Mon, 27 Nov 2023 23:05:57 -0500 (EST) 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 047196B02F6 for ; Mon, 27 Nov 2023 23:05:57 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id BA99016013D for ; Tue, 28 Nov 2023 04:05:56 +0000 (UTC) X-FDA: 81506024712.02.195C8F5 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf04.hostedemail.com (Postfix) with ESMTP id C12C340014 for ; Tue, 28 Nov 2023 04:05:54 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="sjg/pnwl"; spf=none (imf04.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=1701144355; a=rsa-sha256; cv=none; b=Eyywc03ZMzMr+39eIKeot7aV25i/HkqVjfPJJqweEjpuFC5e/wz+eiRPeCpRRbIpqjcOO+ v7fjmv9SZdmkwv46cxdaZcJyy+qW2xjff5fEWEcUcIO4SDRL04ECOqjoPGvMQdTCk24Xyp JQaEERb7HoYVqIQ21rq9ic1Cuis5aNE= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="sjg/pnwl"; spf=none (imf04.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=1701144355; 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=9wOfKfUX3TH3E1LKOSPQ8crkusNA/WZ2sGV/FY6tU6E=; b=kmr+r/mYCfIXwNahOjAkMpULPf0E5UVz/GDIqQuDDiTA8JM8hvgYBSD64ZoedjwSOlGyMU zPnUWTXiZRBWOK5ZuLHzhm8ZrLG2LHBP4qhTIUna5q8c+lP0XvVHsDELr32zA9szBL+0xy NVRFP9su4iI3+Sx3zJ7V8vH0p+k40DA= 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=9wOfKfUX3TH3E1LKOSPQ8crkusNA/WZ2sGV/FY6tU6E=; b=sjg/pnwlbXTgkJMCX/BSOJVCyZ v8qquO6PnPWQnuAlFF77pQ5yqVxBPvHuAC+TioLpsDXXhfpLdw2cQZ5o06bjW2W6s2urwrmPx3ZiG RpdKaQe5QOAoEkO7uJ2o8zJ0yxUVdsDoXcIZKrFiq2rQQ/brHkGD2Kmacbj0XuNUd3aLneWMUTaHH J5jX3H0hkRitJqwmIpg3I/VJWiDVwAYDOBuVVb6yZgsqXZCrcDN3YLtwd2J+QmLd23+sW8MMY20bn 29m3dwNa2OF805UdckypKnphj1BWwutsLkuxOvQndYcqKCt5DHxLmXo4vLIOI9NF1UU1NwB611/Q1 T92ZMrQg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1r7pLj-00C1Bx-4g; Tue, 28 Nov 2023 04:05:27 +0000 Date: Tue, 28 Nov 2023 04:05:27 +0000 From: Matthew Wilcox To: David Hildenbrand Cc: Ryan Roberts , Andrew Morton , Yin Fengwei , Yu Zhao , Catalin Marinas , Anshuman Khandual , Yang Shi , "Huang, Ying" , Zi Yan , Luis Chamberlain , Itaru Kitayama , "Kirill A. Shutemov" , John Hubbard , David Rientjes , Vlastimil Babka , Hugh Dickins , Kefeng Wang , linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [RESEND PATCH v7 00/10] Small-sized THP for anonymous memory Message-ID: References: <20231122162950.3854897-1-ryan.roberts@arm.com> <9c8f6d2a-7ed8-45d2-9684-d77489bd99b8@redhat.com> <26c361bc-6d87-4a57-9fae-ef635c9039c7@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <26c361bc-6d87-4a57-9fae-ef635c9039c7@redhat.com> X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: C12C340014 X-Stat-Signature: cszs76f4ijmza7df9exybbzyt5biiusm X-Rspam-User: X-HE-Tag: 1701144354-657328 X-HE-Meta: U2FsdGVkX19lprBGmSisn+KRlVVXgVZbdvVvpf2nLd7OcMiFq7ToI0wlij21Ifc72RtAJl+grHSehprMBOmkiGFp1BWY8HuTSEwlSgS6Lqa5WdYmnYLTXHpriMJplzJbh2fBfdxqIEKGmT7xJ3ULHNL/vFoXtJSk/xUq0+iGujjVowZtD+YFEg8nOT3htdIeQqx9lXyPcmTowUyQVZrgTm5EwBfiUlw4gs/3bsFy2gyAGoai4PDYo64Xq2ZpRLP++5WyatEIUD8D0jpSM+O34pYPEKdwo89EVRUoJndiULJYkO1axAz0F1IV6cq2nDa1znhOA/gT0WJbtxPyALM9k6E3khmBF1NRuDShEjWqyMzQnHhg0O9Hemj0EkQPSXIPHdHClnC1sI/sdaHgOgTDUaJ3fZJe93FGBqoyxSY1VwbOWedax4Xcpy+Qqyu5qVGb44Up34r+lsZpTyimxgQOc8gG7LoPTveFxlsPkgCm9Lr11v0CzV5SSV0/zRw5N+Ov4o69oPi2fYh/ePwck1VKyC2BpXPzaGIQJSbYLCbfpVJ4ONA9i0dmVc0Uj44E6X4VnQqb0lxqZOS8Bbhbk9gj5XxATjtqibGm3w93NMy/RD5OGTIfYu/oyIzyITj2PIUD/ez86/QeeswILEzvLA5yZt8wVVjRG3AbLZ4f0nvioB+lzd6TAxVo95hbcCAXpId6kcpphLC4fbuawyLXPnWZGcnAJneI5ndCAa+UjPBovwhv5dklwJMPchKgnaMC9VCCDOzRQDP9u623lnxiC7Bt+JG0Ck3ZTXGSf51AB0wnWoa6ol7EUE5XfVl+BUsGzVrLIf4HgjSPwbaRp3Sq4SblbPTqi0k2rdgGjfpcJM0oIiYpKeij273bCCk6r4fOfpQaAYhmUteBY0Xf1NB3KqTkoEl9G73tU6zNGSzXf7cxccfxNBdJkNk87ij73zVvbgeeR3bDUw0Syy+cnfSuK9x wvJ+2vZ7 ARCXb9+GPKRfllGsl/VOMIfudTVrYgEaVmxbzUzlPdgoNcokEI1Br1MouUCPHknQqyDyPmWIzuXBtGO67gI1d/D8RAGJTPGkGN66olJcIde30+Yx/Q207UtmC9E9yZV9DxrGN0v20pHIA2TRbTCgS2BIeIZEhjcwP8VGVAnQrJe/l2zfwxchXTsepkspMnxy/c91BSqxHoyG+n9iAYgn85qF7tw== 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 Fri, Nov 24, 2023 at 06:34:10PM +0100, David Hildenbrand wrote: > On 24.11.23 16:53, Matthew Wilcox wrote: > > > * we already have PMD-sized "large anon folios" in THP > > > > Right, those are already accounted as THP, and that's what users expect. > > If we're allocating 1024 x 64kB chunks of memory, the user won't be able > > to distinguish that from 32 x 2MB chunks of memory, and yet the > > performance profile for some applications will be very different. > > Very right, and because there will be a difference between 1024 x 64kB, 2048 > x 32 kB and so forth, we need new memory stats either way. > > Ryan had some ideas on that, but currently, that's considered future work, > just like it likely is for the pagecache as well and needs much more > thoughts. > > Initially, the admin will have to enable all that for anon either way. It > all boils down to one memory statistic for anon memory (AnonHugePages) > that's messed-up already. So we have FileHugePages which is very carefully only PMD-sized large folios. If people start making AnonHugePages count non-PMD-sized large folios, that's going to be inconsistent. > > am objecting to the use of the term "small THP" on the grounds of > > confusion and linguistic nonsense. > > Maybe that's the reason why FreeBSD calls them "medium-sized superpages", > because "Medium-sized" seems to be more appropriate to express something "in > between". I don't mind "medium" in the name. > So far I thought the reason was because they focused on 64k only. > > Never trust a German guy on naming suggestions. John has so far been my > naming expert, so I'm hoping he can help. > > "Sub-pmd-sized THP" is just mouthful. But then, again, this is would just be > a temporary name, and in the future THP will just naturally come in multiple > sizes (and others here seem to agree on that). I do not. If we'd come to this fifteen years ago, maybe, but people now have an understanding that THPs are necessarily PMD sized.