Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2685013rda; Wed, 25 Oct 2023 09:24:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEcq4UpvZrGy10FtJ59aPnOAPQiCcBpdSkVwyPx3GlybQg/xnrsXPyG1tKgeaFKeAs/4kRg X-Received: by 2002:a25:2f46:0:b0:da0:4586:7f2a with SMTP id v67-20020a252f46000000b00da045867f2amr5304804ybv.33.1698251078161; Wed, 25 Oct 2023 09:24:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698251078; cv=none; d=google.com; s=arc-20160816; b=QvLFyTYsrAtiXdCxu8ezvibY//ODTjAGEBSoZ0Ck72XogHBukIjZJThwGsv5njnplY eRpn2kDhJhb6mbhSmPqb9ozbAmRX9qn9fO3NWVw8c4wNgtuR4jFQMeomiRwq3yzNFdMU vW60k8QnHzbji0eIhF4fKrpLYbieU3kAuhlXLsSX7J4CrJd0/JbHRI5RoOSA3azwgD5w QbEqsndVME1QLlrSZzAwsRrrKMWT3Z9+OzIXfnbAAK7TbHfEBcXxelXzWRxKc4rktKGG biqUMHZBDzAtRdGPREzzJM+vNwp60xI6K74nHau1URFgSECyoVLF8IW1o+7TC3d2zNml eySA== 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:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id; bh=p+CDq9CL5J3SyN1evPcDd5LOolNhpcCshIuMQrQMvXM=; fh=LnKJiXXEsEfAmQ0GA7JIV4WyubX5Q0FERJtFNFMD3yY=; b=SggpjxkqEGp8ahFEP74bSl8ZSCA4NamptDlQqMgTlTg3oaLC/wOAda8J5WXNOPWNXB qft7H0pObeVkVGww/7rYiYFv/xk/jxBZJpex20ZADcgnY6x3J5CWr7Fmi1z0ETblP9TX pQOUuVyPOs7P/gQV/GAcqX3rxTAL8oRlh1bNmJCz3b8vxR3JvfLsQrDysMHFCsAXFgtk LjukmAyCqxFIZTELUU/DJaD+8Lm/Rn5kHRNY42ICoWbLXZ2YWwEdwIyauDlkKQg2obU0 4Zwb5kJhguqggGcntxesg8XNy7zlWPJUmDjfGxa8iYXg9F5exAll213KJNQh0BYzB2FJ i4UQ== 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 w83-20020a25df56000000b00d801af7c4a8si12500493ybg.385.2023.10.25.09.24.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 09:24:38 -0700 (PDT) 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 5C1D08116E72; Wed, 25 Oct 2023 09:24:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232800AbjJYQYb (ORCPT + 99 others); Wed, 25 Oct 2023 12:24:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229583AbjJYQYa (ORCPT ); Wed, 25 Oct 2023 12:24:30 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B250D10E for ; Wed, 25 Oct 2023 09:24:27 -0700 (PDT) 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 039A31FB; Wed, 25 Oct 2023 09:25:09 -0700 (PDT) Received: from [10.57.70.113] (unknown [10.57.70.113]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CD1953F64C; Wed, 25 Oct 2023 09:24:24 -0700 (PDT) Message-ID: Date: Wed, 25 Oct 2023 17:24:23 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 0/9] variable-order, large folios for anonymous memory Content-Language: en-GB From: Ryan Roberts To: David Hildenbrand , Andrew Morton , Matthew Wilcox , 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 Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20230929114421.3761121-1-ryan.roberts@arm.com> <6d89fdc9-ef55-d44e-bf12-fafff318aef8@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE 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, 25 Oct 2023 09:24:36 -0700 (PDT) On 20/10/2023 13:33, Ryan Roberts wrote: > On 06/10/2023 21:06, David Hildenbrand wrote: >> On 29.09.23 13:44, Ryan Roberts wrote: >>> Hi All, >> > > [...] > >>> NOTE: These changes should not be merged until the prerequisites are complete. >>> These are in progress and tracked at [7]. >> >> We should probably list them here, and classify which one we see as strict a >> requirement, which ones might be an optimization. >> > > Bringing back the discussion of prerequistes to this thread following the > discussion at the mm-alignment meeting on Wednesday. > > Slides, updated following discussion to reflect all the agreed items that are > prerequisites and enhancements, are at [1]. > > I've taken a closer look at the situation with khugepaged, and can confirm that > it does correctly collapse anon small-sized THP into PMD-sized THP. I did notice > though, that one of the khugepaged selftests (collapse_max_ptes_none) fails when > small-sized THP is enabled+always. So I've fixed that test up and will add the > patch to the next version of my series. > > So I believe the khugepaged prerequisite can be marked as done. > > [1] > https://drive.google.com/file/d/1GnfYFpr7_c1kA41liRUW5YtCb8Cj18Ud/view?usp=sharing&resourcekey=0-U1Mj3-RhLD1JV6EThpyPyA Hi All, It's been a week since the mm alignment meeting discussion we had around prerequisites and the ABI. I haven't heard any further feedback on the ABI proposal, so I'm going to be optimistic and assume that nobody has found any fatal flaws in it :). Certainly, I think it held up to the potential future policies that Yu Zhou cited on the call - the possibility of preferring a smaller size over a bigger one, if the smaller size can be allocated without splitting a contiguous block. I think the suggestion of adding a per-size priority file would solve it. And in general because we have a per-size directory, that gives us lots of flexibility for growth. Anyway, given the lack of feedback, I'm proposing to spin a new version. I'm planning to do the following: - Drop the accounting patch (#3); we will continue to only account PMD-sized THP for now. We can add more counters in future if needed. page cache large folios haven't needed any new counters yet. - Pivot to the ABI proposed by DavidH; per-size directories in a similar shape to that used by hugetlb - Drop the "recommend" keyword patch (#6); For now, users will need to understand implicitly which sizes are beneficial to their HW perf - Drop patch (#7); arch_wants_pte_order() is no longer needed due to dropping patch #6 - Add patch for khugepaged selftest improvement (described in previous email above). - Ensure that PMD_ORDER is not assumed to be compile-time constant (current code is broken on powerpc) Please shout if you think this is the wrong approach. On the prerequisites front, we have 2 items still to land: - compaction; Zi Yan is working on a v2 - numa balancing; A developer has signed up and is working on it (I'll leave them to reveal themself as preferred). Thanks, Ryan