Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp956813rdh; Fri, 24 Nov 2023 01:56:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IGi/fDvgKd4dhfDYswcy9fAe5Yn44qnCO5stnvgRtI2m8dmtPizgQyu8X/S8SlSdl8gtNwX X-Received: by 2002:a17:902:e9cd:b0:1cf:a417:365b with SMTP id 13-20020a170902e9cd00b001cfa417365bmr1041718plk.52.1700819818636; Fri, 24 Nov 2023 01:56:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700819818; cv=none; d=google.com; s=arc-20160816; b=wKobvBhaRtDBrFYS3wj2EoXk7eZyorIKgVHzPCxGBE8e4btuoMBNTooLTApo3XB1ys jm6dmdRw6NQfHuWSFXTouObKK/qvgQ8AYCdIc0VKcPkugTH0Ph6+qIOBXj9G4YjLXgW5 A1vqShLspsAtXiSValWzyTg6oIp1Zsu+HZlYmsrB0K0SwI9Y7v3nnB6IwMpYznwqo2u/ pzNaTM5Bza0zL0t3jbtYGdGB1z8dfBHge5XuSlI0Ms6NsYlGaDNZ4pCZQ2bvmdPGoGbt AQTzMjZfeB/YQ1eFepPhYxy/xE9RJMbuwjjz8NCINk9ogM1B9QFtgfyv6CTDfLqwTSZC sCBQ== 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=8C8Nq1dEkRZHOjdm/PeDcGFa0rd0ECatcLzmSNvX/IQ=; fh=5ZsJydy5B6VGIioVN6b9dmuTqBbxmuGkJLEJS6Ke3NM=; b=FDI0+sgdV1+lruBjx+pDlAF2oIEwUFiJsvcxFrSOY3UzM/K5/Oe+RpF8S2Xzdkpsjp VIsJz4aCSnUqyCNZHGrXu0/t+NCjP3gIPSQd76GRGOsZKhTsI/azf4qLhFUr+hYw75cd 6OIRg7xTNCEDJyz6bLNJKWZd9lJ2iETX4V5LqHKRzcMjsScajJcWTyZQGHPel239HPOO U76qm1Uk65flY//XNIGcQ2DW7b3oajiSJeALXhfP/lxuE8N96O1bVf+8wxMWqJtJVWEh p9akBV16YQOpWMUEadQa2/nUO44WsV5VWKuFw3jaaa+4tumQRhEVaoWA9Z3eTY0PLLPJ ENaQ== 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:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id u15-20020a17090341cf00b001cfa1b73d41si1517789ple.399.2023.11.24.01.56.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 01:56:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 0E7BA8049D57; Fri, 24 Nov 2023 01:56:56 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230350AbjKXJ4l (ORCPT + 99 others); Fri, 24 Nov 2023 04:56:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229668AbjKXJ4j (ORCPT ); Fri, 24 Nov 2023 04:56:39 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0FC8992 for ; Fri, 24 Nov 2023 01:56:46 -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 35B5D1063; Fri, 24 Nov 2023 01:57:32 -0800 (PST) Received: from [10.57.71.2] (unknown [10.57.71.2]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 09BD53F7A6; Fri, 24 Nov 2023 01:56:42 -0800 (PST) Message-ID: Date: Fri, 24 Nov 2023 09:56:37 +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: Matthew Wilcox Cc: Andrew Morton , Yin Fengwei , David Hildenbrand , 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 References: <20231122162950.3854897-1-ryan.roberts@arm.com> From: Ryan Roberts In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email 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 (howler.vger.email [0.0.0.0]); Fri, 24 Nov 2023 01:56:56 -0800 (PST) On 23/11/2023 15:59, Matthew Wilcox wrote: > On Wed, Nov 22, 2023 at 04:29:40PM +0000, Ryan Roberts wrote: >> Note: I'm resending this at Andrew's suggestion due to having originally sent >> it during LPC. I'm hoping its in a position where the feedback is minor enough >> that I can rework in time for v6.8, but so far haven't had any. >> >> Hi All, >> >> This is v7 of a series to implement small-sized THP for anonymous memory >> (previously called "large anonymous folios"). The objective of this is to > > I'm still against small-sized THP. We've now got people asking whether > the THP counters should be updated when dealing with large folios that > are smaller than PMD sized. It's sowing confusion, and we should go > back to large anon folios as a name. I suspect I'm labouring the point here, but I'd like to drill into exactly what you are objecting to. Is it: A) Using the name "small-sized THP" (which is currently only used in the commit logs and a couple of times in the documentation). B) Exposing the controls for this feature as an extension to the existing /sys/kernel/mm/transparent_hugepage/* sysfs interface (note the interface never uses the term "small-sized"). If A) then this is easily solved by choosing another descriptive name and updating those places. Personally I think it would be best to continue to use "THP" since we are exposing the feature through that interface. Perhaps "large folio THP". If B) we could move the interface to /sys/kernel/mm/large_folio/*, but that introduces many more banana skins than the current approach IMHO: - We would still want to expose the PMD-size large folio through this new interface and so would still need "global" or equivalent for at least PMD size, but "global" now points to a completely different sibling directory structure. And it probably doesn't make any sense for the non-PMD-sizes to have "global" because that would imply the THP interface could control the non-PMD-sizes, which is what we are trying to separate in the first place. So we end up with an asymmetry. - When we get to adding other feature support for the smaller sizes (e.g. khugepaged), we will end up having to duplicate all the controls from transparent_hugepage/* to large_folio/*, then we have the problem that e.g. scan rates could differ and we would end up needing 2 separate daemons. On the interface, David and I did request feedback on the proposal a number of times before I coded it up. I'm sure all solvable eventually, but I personally think it is overall simpler and more understandable as it is. I also agree with the other points raised in favor of "small-sized THP". Thanks, Ryan