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 B6470C0032E for ; Wed, 25 Oct 2023 16:24:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D58406B033D; Wed, 25 Oct 2023 12:24:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D082C6B0343; Wed, 25 Oct 2023 12:24:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BD1026B0345; Wed, 25 Oct 2023 12:24:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id AF8F76B033D for ; Wed, 25 Oct 2023 12:24:30 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 8755B1CB2FC for ; Wed, 25 Oct 2023 16:24:30 +0000 (UTC) X-FDA: 81384506700.10.2F71310 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf26.hostedemail.com (Postfix) with ESMTP id 6D119140025 for ; Wed, 25 Oct 2023 16:24:28 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf26.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=1698251068; 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=p+CDq9CL5J3SyN1evPcDd5LOolNhpcCshIuMQrQMvXM=; b=iOyW/kOjbGv8N7oalmpg3323XLPb78Andkigrx+4El+qN1qrSWz1PnFOi2L/y+os6vsobr 9P4SPjPTiVReTFS1meOz6lINUgo0MdJTKLPeQtALQE9QehD5xmUVHTQ7cP2JDJS2WgF1Vq fyOJWdcSKO8Kp5ULKpNHHrqlS/GWEMc= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf26.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=1698251068; a=rsa-sha256; cv=none; b=ITvhb6rJGeF16WImWn5iz95r4z0Gp2bhV4v8F7sXOYtm6zcbQrBv/ehAZOQoeNxlrcHXh3 5xzTONzrA7BsatF61sILFCQRlsvDRzPlaim+OsWF5IwhgN2/N6TgsLp0jRlbD9MTtl/N4a URvVca+fqWanlHQUvNZ2lXAzO2r/y2Q= 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-Rspamd-Queue-Id: 6D119140025 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: 5fnuptc5yb7i39jd6ngyifk36dyp3d97 X-HE-Tag: 1698251068-556748 X-HE-Meta: U2FsdGVkX19cweVzbKyrrUxADXWWNZhjfMxPSjOik8oiS0DdCwfBeHfBYjhcr7+TOeOt3IiDiORke0gOB3kloK1qmhV8//s66tbK6XTdxA/QgIfHS28PD1AlOvxoQ1HhgBKdR6NEvOBWivzC9wlD86pV0NRJBqr/+RdXPnuW1LHh7K62weZQxGbA+nvGFq9vJ+0beDBG8hivUTcK5+LMdKbX3N239enOJbGn2TX2b5OoRXBacG1DSDQ+kHFHrIAmzpD9K5HA1G/uu8MbNO9cBNX0IcLk+DYc4/CDHIxEc8T4hy93j8BEEqiaHSPdsuKtUW3wdZ7headjFM+dSwT8wC8rwLwHgBJG9d0E/7CtSloYimT8/FDfNsUjcOWcgA8tG/sXAG/5y4P8TDrHDqsjpKhidFTfIxFkQnraw7AHCoDJ6UArnArzQoRQw1pZJxL0HCZbe25QDsqbavYzCqKGsFMDyiVLxmNpuYmahBp081j//QaR/PtZ8T548otA1mBtdtQCwb2dXHvMHIJJzKNKZyamJGYINK1BE91Twj6ZYriyYm6ALeLPR4l+s0LOmYXmNQkpsKPsXFhIxvSOn36PU/NPYxW/51RZbGqL6BW/Neq7TGVlaTt6D0qZazrTIMN8/v/I1Se5lB+YKGqsBiTiWmxLwfockk0zyEv1CHfDIqfv2LdWKl5BVMbCL11+nAnceUXUuZgS+mMFzm6+JcucianYoPFzL+6E/g/MGTQmNy3TxIcbfixyv1zzl5F7eKoHoozhQdOJIkto4P03wDNr7U+Qks2UCIRTuMa6AmcCIfvG5mt0JtnMw/ZE1OAkyDkJnUnI9HCvYJ1u+iQv8R1aeVmHZhN7A+dn3kBmrsH9Y0RukQ8b4KCUOxEfsvisF6K6KDQLXFzaFUvwzUCF5fi62ZZ883xs3rdSaMWnRNTGAj7NNNSaoSPnAE0ypR4D7o8OoR2cvQ/1MGttsul0Abz dSXb2Mr1 AFNrFn8sG87qA5nYgDk7ymNnmmI7E77d8zBXTluwYs+dlM+52eqDt2wMUtW2RV21650PQWQruMw9JlOwlVrFDAL0kP+B3+68LpdwV8KPgZD2oXZvFC0yiot182PbD+B+MQEnngxDjJeKwb/n6VT0ukdWPJC3ZgIHtVGNemV4wOV0HWnnjtD4GhSE0RZH8hpGEzg6LEwQTTFyWbVaBVxBDgQsPfXtJSQnTKLxvQrMIOPwjyvm/rZh9ZzlA0AOqL0yckrplM51aL4rC023Pk4irjahoTw== 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 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