Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4457974rdh; Wed, 29 Nov 2023 01:59:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IGPuMmD1ICRvFkbRlQ7inqNesPn26slOeinNYe8zNIBjMXdoe68XPk1GyqmBjJZZnkUnP3d X-Received: by 2002:a05:6808:138c:b0:3ae:501e:a64a with SMTP id c12-20020a056808138c00b003ae501ea64amr23880116oiw.10.1701251999624; Wed, 29 Nov 2023 01:59:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701251999; cv=none; d=google.com; s=arc-20160816; b=JsgBg1ZqoxGYzxN2zINzNQ1VSVkLmo8qtAWHqI5/MfDsXyAL1SFCQ6iz8aAXevqVOL g/AzRxrlFr+wBsDddX0WxzRnuP4iukmqX442s/WEHA2UH0XLIWduMCMIs/1e/C++iqFs +tOFtKkS3UbrNe/nbcHrlIgYO3LsnEgj7RzyE2WAIZfqhiDsidD2HZI99B2mEKKBlWxL oLe8S11RxbjfcCLs8xcPils71oJx0Id5cpkppC2/J0EHjNyl4YPA8/iB9b0RrfIuMBIi cb+JoA0s/x9pcSZdPicnhJ4s6cGLxtHHmI+3iykBvEuOyPtdhDJalSfuN0uVDMfva+Ip /JEg== 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=i6M+T+N80QeVDEWhFQzuJ8TzUiDoZ4N3KBt+j2u5Vnk=; fh=igZUQNcyh0e9YISclaiqzJLRbjOyGDKt7Jb2EsROY2M=; b=Hcw/zAPTghDTL7PSwrxWHkEAC35ZHyzjY2Xp3gtP9WNhugOJ7sdnFhn2RpCZI6tLF8 elqaNi60EA+dhT8xpKBVLFSFpNM53b44HXl7ZObJuNN/JW8QHoBwfrRJ3zsSccAnULeL u5ondoI5sH6JurvZZCr90F469l+rr4hZHoi6yN6M6NsBkffPMI8VfbHpXQjInG7LEM3n VkpvKgw1HdihPoVKubB4zUWZSaSdst/+OJoj7N5aBivUxxn812u2gcv4OuhxZJq1Nk8O TDhwQUAWUHDPXngoYPT374DaSRgTNLVOlKP2giGRyXxDFo+p7xS2j52CV6pa/hWNZSGk /bkw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id o4-20020a656144000000b005c1b5a76098si13162632pgv.771.2023.11.29.01.59.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 01:59:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 A82A98031E31; Wed, 29 Nov 2023 01:59:58 -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 S230495AbjK2J7r (ORCPT + 99 others); Wed, 29 Nov 2023 04:59:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230377AbjK2J7p (ORCPT ); Wed, 29 Nov 2023 04:59:45 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 488CA19A6 for ; Wed, 29 Nov 2023 01:59:51 -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 A16792F4; Wed, 29 Nov 2023 02:00:37 -0800 (PST) Received: from [10.57.70.211] (unknown [10.57.70.211]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9DEA03F5A1; Wed, 29 Nov 2023 01:59:47 -0800 (PST) Message-ID: <832a486c-7f22-49cd-a3f5-3709dc6c6d09@arm.com> Date: Wed, 29 Nov 2023 09:59:46 +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: John Hubbard , David Hildenbrand , 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> <47d27539-6cf1-4375-9bbb-2ebb9a2acfb3@nvidia.com> From: Ryan Roberts In-Reply-To: <47d27539-6cf1-4375-9bbb-2ebb9a2acfb3@nvidia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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]); Wed, 29 Nov 2023 01:59:58 -0800 (PST) On 28/11/2023 18:39, John Hubbard wrote: > On 11/28/23 07:34, Ryan Roberts wrote: >> 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: >>>> 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. > > Sounds workable to me, too. > >> >>> >>> 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. > > OK. > >> >>> >>> 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. >> > > We do want to have at least some way to verify that mTHP is active from > day 0, though. Could you clarify what you mean by "active"? Current plan is that there will be a per-size transparent_hugepage/hugepages-kB/enabled sysfs file that can be querried to see if the size is enabled (available for the kernel to use). But for this initial submission, we previously agreed (well, at least David and I) that not having a full set of stats is not a problem - they can come later. So the only way to verify that the kernel is allocating and mapping a particular THP size is to parse /proc/pagemap and look at the PFNs for now. Is that sufficient? > > > thanks,