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 B495CC07E97 for ; Tue, 28 Nov 2023 15:34:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C739B6B0083; Tue, 28 Nov 2023 10:34:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C23F56B0088; Tue, 28 Nov 2023 10:34:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AEB976B0089; Tue, 28 Nov 2023 10:34:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 9F3506B0083 for ; Tue, 28 Nov 2023 10:34:58 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 404991A01D9 for ; Tue, 28 Nov 2023 15:34:58 +0000 (UTC) X-FDA: 81507761076.01.72A95F1 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf27.hostedemail.com (Postfix) with ESMTP id CDD544001F for ; Tue, 28 Nov 2023 15:34:55 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf27.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1701185696; 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=8DwfiJINDurvLoqKa4JXpK9PJix8bqMJLzs3D21rJFk=; b=aDCbbKVCxWKwOTreAeVwZfz5t3KaYfHHWz8Q3mUNfbxU+9lcfH9bkalu+yqj3Iz78X2L7C aNhqIoO6mLNA/ORBsP0OiCPW1aPV8cxk+G12RNXXF0l1LE/y4JLf5kO/4gQqAuM54k37mv dAoUPgEckkBn6pUWsr8IRoMrkaXZXaY= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf27.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1701185696; a=rsa-sha256; cv=none; b=a2jAR+EpdhmtmL4P5Airs4reotCUBreMgjn3dFDDloidGeoM4L/KUPIHpVMX7XsQRcePIM FKrAHh0+oiBX+CGwLnmEc6ewuoce+2GB7X575dQbhq74IqECdzNvzMfoGPVuMahF3jvdKx lpQCtwqBoNglruMVstrekk+J1M2HGIc= Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 06F36C15; Tue, 28 Nov 2023 07:35:42 -0800 (PST) Received: from [10.1.33.188] (XHFQ2J9959.cambridge.arm.com [10.1.33.188]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F2B783F6C4; Tue, 28 Nov 2023 07:34:51 -0800 (PST) Message-ID: Date: Tue, 28 Nov 2023 15:34:50 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RESEND PATCH v7 00/10] Small-sized THP for anonymous memory Content-Language: en-GB To: David Hildenbrand , John Hubbard , Alistair Popple Cc: Matthew Wilcox , Andrew Morton , Yin Fengwei , Yu Zhao , Catalin Marinas , Anshuman Khandual , Yang Shi , "Huang, Ying" , Zi Yan , Luis Chamberlain , Itaru Kitayama , "Kirill A. Shutemov" , David Rientjes , Vlastimil Babka , Hugh Dickins , Kefeng Wang , linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20231122162950.3854897-1-ryan.roberts@arm.com> <9c8f6d2a-7ed8-45d2-9684-d77489bd99b8@redhat.com> <26c361bc-6d87-4a57-9fae-ef635c9039c7@redhat.com> <87sf4rppuc.fsf@nvdebian.thelocal> <51e6c9f1-e863-464b-b5f3-d7f60a7ebed6@arm.com> <58af512c-3d7d-4774-88f7-6336c9384b61@arm.com> <137902b6-24dc-4d51-9be2-6f94aa9dbc3a@redhat.com> From: Ryan Roberts In-Reply-To: <137902b6-24dc-4d51-9be2-6f94aa9dbc3a@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Stat-Signature: 757z7yc8hc8n8y74g8xfb3aik1d3fdjh X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: CDD544001F X-HE-Tag: 1701185695-761706 X-HE-Meta: U2FsdGVkX1+s2biZn5/Q8HCYb6pUg5/YWvQLWtv9FfYRkUPBvO+REcTkYYtrWTPMCqUycggbHsSykfIUO5wcJ4I2P/KOf8edcLpjjDdoeW3WObnYoygHgudtx/402uu8LNDX2FuSyuLcr7quRUSSop4moIduEO5IfiXp3Oo7aV2GHkxkdCDVbWa/08WsDOzvBWe0P0Xxha3nD81mcX43aJDX2WYCqV8rknUlmmm+lvl3F1i71Dd1o2Ub++g5JKQ3chfYoOl3esPqj/209R7rHDRnyd/jDd9WB2A/dpZSX7bwe0MXIHIj8ZN+Qz5YNe1U6RyhFyUkZQJouchk+W2r+N31nGm7+JygmAHTI0/JkUltfaoVJtoxf+U7TttNZ+WPzv5mpnUnwQpvV1qmLHxDNIxSO1JcgYtknEcTlTBDtl+Pthyo1CzcuBK44+NAiEh48hVyjOKgrp7OyJU3n7iZg98uWu1T8o1BEvFfSocRO0/FSeTgCPxv3wzs7W2dtY7paoZrzH5tkBMQO69SzSyp2pXQIZjQcXF5DCxNEaHOXXgWG2bFSoyVYxtrll0qA2DMPPcH1maEd8Z+sGfyRnoCSZFl2H2KOJ8lAuJcx+LWn+NZi7WW/9A3qVSXlsyXV5Gia4VTJQI+tO1GNsHoOM38novx09bvws08HdqqBfoqui2nMLeSxVEHRz7wONFuR6gcXMlWXhEP6qAVWhWO07RL+dZlRxnEd6qqhvCNiFy7u3z/3WTBbKUa1k7x1uHUYHe8MDw9jdNKTEgjPPVOBQPAC6HIdojksTWErJ0zcOyZo+z8XZqhev1wLCPvoDO5MIrKOJv0E6D86ZQAH3s94bur092yyFahZ4Oc+1646ndy4DWExTviiIB82Mg/kxotR2rGW16cTXNY52bb1VsdQ3lw0t4yS0v3v18bG5R10SQgjOoEedPX9zP/AZ1T3pAfnazdHAeJg1k4y0ALfYDQDo6 puP99slu QeCNy327TsSl9xyYpqM4dczUCzkAJ2eb9muwJ/tzJQ6hGgczJ82ZshzKI6iBvNVqhSfIyevEPh5PsxrP1a4/QTygletvkaQEGKIDzIsHe+Yzm6SNTEQcQWvgaiwuPs4cvNyKgwVUDOmphHz4WahLlC384VqgWxfzRPHk/1qdTZ2+FxCV2Q8QaF2SVSEhXE7dnqp8rzqfRy5CuTiHSCupXpA1KABKH6YMOvkGt 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 28/11/2023 14:09, David Hildenbrand wrote: > On 28.11.23 13:15, Ryan Roberts wrote: >> On 28/11/2023 08:48, David Hildenbrand wrote: >>> >>>>> >>>>> Agreed. We are bikeshedding here. But if we really can't swallow "small-sized >>>>> THP" then perhaps the most efficient way to move this forwards is to review >>>>> the >>>>> documentation (where "small-sized THP" appears twice in order to differentiate >>>>> from PMD-sized THP) - its in patch 3. Perhaps it will be easier to come up >>>>> with >>>>> a good description in the context of those prose? Then once we have that, >>>>> hopefully a term will fall out that I'll update the commit logs with. >>>>> >>>> >>>> I will see you over in patch 3, then. I've already looked at it and am going >>>> to suggest a long and a short name. The long name is for use in comments and >>>> documentation, and the short name is for variable fragments: >>>> >>>>        Long name:  "pte-mapped THPs" >>>>        Short names: pte_thp, or pte-thp >>> >>> The issue is that any THP can be pte-mapped, even a PMD-sized THP. However, the >>> "natural" way to map a PMD-sized THP is using a PMD. >>> >> >> How about we just stop trying to come up with a term for the "small-sized THP" >> vs "PMD-sized THP" and instead invent a name that covers ALL THP: >> >> "multi-size THP" vs "PMD-sized THP". >> >> Then in the docs we can talk about how multi-size THP introduces the ability to >> allocate memory in blocks that are bigger than a base page but smaller than >> traditional PMD-size, in increments of a power-of-2 number of pages. > > So you're thinking of something like "multi-size THP" as a feature name, and > stating that for now we limit it to <= PMD size. mTHP would be the short name? Sure. > > For the stats, we'd document that "AnonHugePages" and friends only count > traditional PMD-sized THP for historical reasons -- and that AnonHugePages > should have been called AnonHugePmdMapped (which we could still add as an alias > and document why AnonHugePages is weird). Sounds good to me. > > Regarding new stats, maybe an interface that indicates the actual sizes would be > best. As discussed, extending the existing single-large-file statistics might > not be possible and we'd have to come up with a new interface, that maybe > completely lacks "AnonHugePages" and directly goes for the individual sizes. Yes, but I think we are agreed this is future work.