Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3934222rdh; Tue, 28 Nov 2023 07:35:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IHxXsL82KxLwthePB/Ttq3tcarA8+ooyFzNqUhwlL9xXQCgM8S99/jwztIsyT0yR4sQ9Pc+ X-Received: by 2002:a05:6808:179d:b0:3b8:3f9f:4c73 with SMTP id bg29-20020a056808179d00b003b83f9f4c73mr21824908oib.26.1701185703883; Tue, 28 Nov 2023 07:35:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701185703; cv=none; d=google.com; s=arc-20160816; b=Q3xV878igTwOdFCTQ42g0/BDixKg8zYMqUNVgpOnxjLrhuPkNbMG0qmdDcY8zLXQVo bs8UPMVPxOatcUb9ddRNSu4TfR/UeMbVDlD1SO1LKhSyAmh5W0+nUUM13HQKbzt0cNkz T/3cxhJZzwKaJApATMOKeBl3Izt/gM6gn9Hzn+w7ML2TRnTaRtzrxMG7AZKmtP8lzeEi Z8vFeHiMgXjJB6C6FAHALhlWr2GmQPKeB2//34Qui3yMwoG9VvwuEh7/NHI/tniK504R 1ILiyHN9+T7s7/x3wYi1rGxN7XEL1MuDWk2sG7Df7vhkjFpdtgY9pFpMrh7jVZ831Rgl zcwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=8DwfiJINDurvLoqKa4JXpK9PJix8bqMJLzs3D21rJFk=; fh=eO9HPzBE78xEf85K5j9LbqC8iF2d9bG552s7iggNPRg=; b=V09yZOPLxadsnfWqBQyUf9xgxVrBUXe3QFZ0XOABYFHeY4I9laKVZu/isnHSuRkW2T KNY+d/1bZXjdwArch4fqPVdxW9XL4IJxq3YPs83RqhpXC2CFs2vQvGeu9L7QMs01lur/ rE31yarVan58oGmwslFtypgAmGbJSVkge9S4LrKHTxQ+s6iVTT6tbr3RQ52FZd5BqCzw N6oXMtKP1eJw+8YQMjMU+IH9xWrJTscrczDYrMcZGmM/+wZrQZOb7Ojx5kZgzR+09NOE 4dUFE7jiqJz4jaIpACoz7wBvmWiK1XOgM0pO54J4E/zMhNwREOWKzpVL7wes0NM+p6KM KY5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id l12-20020a65680c000000b005b3b889619asi12114288pgt.606.2023.11.28.07.35.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 07:35:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 7CBB180B1D29; Tue, 28 Nov 2023 07:35:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346844AbjK1Peu (ORCPT + 99 others); Tue, 28 Nov 2023 10:34:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346835AbjK1Pes (ORCPT ); Tue, 28 Nov 2023 10:34:48 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E7A89D1 for ; Tue, 28 Nov 2023 07:34:54 -0800 (PST) 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 28 Nov 2023 07:35:02 -0800 (PST) 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.