From: David Hildenbrand <david@redhat.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>, Yu Zhao <yuzhao@google.com>
Subject: Re: PageOffline: refcount, flags and memdesc
Date: Thu, 14 Nov 2024 21:45:34 +0100 [thread overview]
Message-ID: <ccf790e1-c33a-4c74-bce7-8e04f5355089@redhat.com> (raw)
In-Reply-To: <ZzZdnuZBf-xgiwD2@casper.infradead.org>
>>
>> Instead of alloc_frozen_pages(), I was wondering if we should have something
>> like GFP_FROZEN. For example, for two PG_offline users
>> I'd currently also need alloc_contig_frozen_range() and
>> alloc_contig_frozen_pages(). Using alloc_contig_range(GFP_FROZEN)
>> alloc_contig_pages(GFP_PROZEN) would make that easier.
>>
>> Did you consider that already?
>
> I think Yu Zhao's recent patches:
>
> e98337d11bbd ("mm/contig_alloc: support __GFP_COMP")
> 463586e9ff39 ("mm/cma: add cma_{alloc,free}_folio()")
> cf54f310d0d3 ("mm/hugetlb: use __GFP_COMP for gigantic folios")
>
> get us most of the way there.
>
> What I really want to do is make contig allocation not do anything with
> the refcounts. Hoist that into the callers which actually want it
> (probably not many), and then we can actually drop the __GFP_COMP
> support to alloc_contig_range_noprof().
Right, at least virtio-mem cannot easily support
alloc_contig_pages(__GFP_COMP; we'd need splitting support, and it
should be a separate effort than reworking PageOffline; and it would all
be in vain if we drop __GFP_COMP later again :
So regarding the PageOffline refcount rework it would be easier to do it
stepwise
1) add GFP_FROZEN support to alloc_contig_*
2) convert the two alloc_contig_*+PageOffline users to use that
3) convert the remaining alloc_contig_* users to GFP_FROZEN
4) make GFP_FROZEN implicit (drop it?) and drop __GFP_COMP
3) is a bigger task, likely too big to do in one shot.
--
Cheers,
David / dhildenb
prev parent reply other threads:[~2024-11-14 20:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-14 11:18 David Hildenbrand
2024-11-14 15:23 ` Matthew Wilcox
2024-11-14 15:55 ` David Hildenbrand
2024-11-14 20:29 ` Matthew Wilcox
2024-11-14 20:45 ` David Hildenbrand [this message]
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=ccf790e1-c33a-4c74-bce7-8e04f5355089@redhat.com \
--to=david@redhat.com \
--cc=linux-mm@kvack.org \
--cc=willy@infradead.org \
--cc=yuzhao@google.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