From: David Hildenbrand <david@redhat.com>
To: Ryan Roberts <ryan.roberts@arm.com>,
Matthew Wilcox <willy@infradead.org>,
Yang Shi <shy828301@gmail.com>,
"Yin, Fengwei" <fengwei.yin@intel.com>,
Yu Zhao <yuzhao@google.com>, Zi Yan <ziy@nvidia.com>,
David Rientjes <rientjes@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Vlastimil Babka <vbabka@suse.cz>,
John Hubbard <jhubbard@nvidia.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Linux-MM <linux-mm@kvack.org>
Subject: Re: ANON_LARGE_FOLIOS meeting follow-up & refined proposal
Date: Tue, 26 Sep 2023 20:29:54 +0200 [thread overview]
Message-ID: <8fa8c314-3984-e600-94fd-e5a7708d8c65@redhat.com> (raw)
In-Reply-To: <4830fb3e-4a35-4842-98f4-9e7baa0e692a@arm.com>
On 22.09.23 17:48, Ryan Roberts wrote:
> On 14/09/2023 09:16, Ryan Roberts wrote:
>> Hi All,
>>
>> Thanks for participating in the discussion yesterday - it finally feels like we
>> are converging on the MVP feature set. Below are my notes from the call and a
>> modified proposal for controls and stats. It would be great if we can continue
>> to review and refine over email. I'm also planning to post an implementation
>> within the next couple of weeks, which I hope will also accelerate convergence.
>
> I never had any feedback on the below; I'm not sure if that means everyone is
> happy or that nobody read it??
>
> I've got an implementation for all of the below ready to go, with a few tweeks
> to the details (the main change is that anon_orders is now a bitfield where each
> set bit represents an order in the set, rather than the originally proposed
> comma-separated list of orders).
>
> BUT I've had yet another idea on the controls front, which would enable exposing
> this to user space as an extension to transparent_hugepage, while continuing to
> support THP as is and also be able to control THP and ALF (anon large folio)
> usage independently. On reflection, I think it is cleaner to do it this way for
> a couple of reasons:
>
> - We don't have to introduce a whole new feature (ALF) to the user. Most of
> the concepts and controls overlap a lot with THP anyway, so if we can make
> it look like an extension, I think it would be easier to communicate.
>
> - The approach I have in mind would make it easy to extend to orders greater
> than PMD_ORDER in future if that's a direction we want to eventually go.
> Because >PMD_ORDER implies multiple PMD entries, it would half belong to THP
> and half belong to ALF in the current proposal, which is nasty.
>
> I'll lay out the new proposal now, but I suspect this will ultimately warrant
> another mm alignment meeting...
>
>
> Add 2 controls to sysfs:
>
> /sys/kernel/mm/transparent_hugepage/anon_orders
> - bitfield where set bits are orders that will be tried during allocation
> - defaults to 1<<PMD_ORDER, which gives current THP behaviour with no ALF
> - For now, 1<<PMD_ORDER is highest settable bit, but easy to expand in future
> - To enable ALF, set the appropriate lower bits
> - To disable THP, clear 1<<PMD_ORDER
> - (In future we could add an "auto" option too)
>
I recall discussing that in the past -- where we also thought about
adding exactly that to debugfs -- but the consensus was that we should
keep THP alone.
I agree at this point that we better keep THP alone.
THP might be a subset of ALF (at some point, hopefully), but not the
other way around IMHO.
--
Cheers,
David / dhildenb
next prev parent reply other threads:[~2023-09-26 18:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-14 8:16 Ryan Roberts
2023-09-22 15:48 ` Ryan Roberts
2023-09-23 0:33 ` John Hubbard
2023-09-25 8:51 ` Ryan Roberts
2023-09-26 18:31 ` David Hildenbrand
2023-09-27 7:23 ` Ryan Roberts
2023-09-27 15:32 ` David Hildenbrand
2023-09-27 19:04 ` Ryan Roberts
2023-10-02 12:58 ` David Hildenbrand
2023-10-05 7:37 ` Ryan Roberts
[not found] ` <c60321ef-8596-8fa0-7367-f43e69e1d894@redhat.com>
2023-10-05 9:46 ` Ryan Roberts
2023-10-06 11:53 ` David Hildenbrand
2023-09-26 18:34 ` David Hildenbrand
2023-09-26 8:13 ` Kirill A. Shutemov
2023-09-26 18:29 ` David Hildenbrand [this message]
2023-09-26 18:26 ` David Hildenbrand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8fa8c314-3984-e600-94fd-e5a7708d8c65@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=fengwei.yin@intel.com \
--cc=jhubbard@nvidia.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=ryan.roberts@arm.com \
--cc=shy828301@gmail.com \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
--cc=yuzhao@google.com \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox