From: Mike Rapoport <rppt@kernel.org>
To: Pratyush Yadav <pratyush@kernel.org>
Cc: Pranjal Shrivastava <praan@google.com>,
Samiullah Khawaja <skhawaja@google.com>,
Pasha Tatashin <pasha.tatashin@soleen.com>,
Alexander Graf <graf@amazon.com>,
David Matlack <dmatlack@google.com>,
kexec@lists.infradead.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 0/4] kho: Support preserving unsplit high-order pages
Date: Thu, 9 Jul 2026 14:00:12 +0300 [thread overview]
Message-ID: <ak9_PDCQjNWHWCyT@kernel.org> (raw)
In-Reply-To: <2vxzy0fll71f.fsf@kernel.org>
On Wed, Jul 08, 2026 at 07:34:20PM +0200, Pratyush Yadav wrote:
> On Wed, Jul 08 2026, Pranjal Shrivastava wrote:
> > On Wed, Jul 08, 2026 at 04:36:46PM +0000, Samiullah Khawaja wrote:
> >>
> >> I think this makes sense. The mm already relies on the allocator to
> >> track the type of pages it has and expectes it to use free_pages or
> >> put_page() or free_page(), so it is natural for KHO to rely on the
> >> caller to call the right restore API.
> >>
> >> Lets add kho_preserve/restore_page_contig|_order|_nonsplit and the dma
> >> preservation can use the appropriate one during restore.
> >
> > Ack. I like kho_restore_contig, I don't think we'll need a preserve for
>
> Dunno, everything is contiguous, folio, 0-order pages, higher order
> pages. So not exactly the best name.
>
> Since you'd get these pages via alloc_pages, perhaps
> kho_preserve_pages() works better for this kind of allocation, and for
> the _current_ kho_preserve_pages(), we can rename it to
> kho_preserve_split_pages()? It is a bit too wordy though, so that's a
> downside.
>
> Mike, you are better than me at naming things, so do you perhaps have
> any better ideas? :-)
Thank you for the compliment, but I'm drawing blank on this one :)
The best I could come up with is to kho_preserve_page_range() for order-0
pages.
> > this though? Preserve doesn't seem to be preserving refcounts, I guess
> > we could rely on kho_preserve_pages and the caller can use
> > kho_restore_pages_contig() to set refcount correctly for unsplit pages?
>
> No, kho_preserve_pages() can split the preservations in unexpected ways.
> While for a high order pages the current algorithm _shouldn't_ do it, it
> is simpler to just add a new preservation function.
>
> Move things out into helpers if you want to avoid duplication, though at
> first glance I don't think there should be much.
Right, preserving compound pages is more similar to preserving folios
actually.
> --
> Regards,
> Pratyush Yadav
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2026-07-09 11:00 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-03 2:08 [RFC PATCH 0/4] kho: Support preserving unsplit high-order pages Pranjal Shrivastava
2026-07-03 2:08 ` [RFC PATCH 1/4] kho: Introduce infrastructure to track preserved page types Pranjal Shrivastava
2026-07-07 8:28 ` Mike Rapoport
2026-07-03 2:08 ` [RFC PATCH 2/4] kho: Detect " Pranjal Shrivastava
2026-07-07 8:28 ` Mike Rapoport
2026-07-03 2:08 ` [RFC PATCH 3/4] kho: Implement page-aware refcount restoration Pranjal Shrivastava
2026-07-07 8:28 ` Mike Rapoport
2026-07-03 2:08 ` [RFC PATCH 4/4] kho: Introduce kho_split_preserved_pages() helper Pranjal Shrivastava
2026-07-07 8:28 ` Mike Rapoport
2026-07-08 0:23 ` Samiullah Khawaja
2026-07-07 8:28 ` [RFC PATCH 0/4] kho: Support preserving unsplit high-order pages Mike Rapoport
2026-07-08 14:34 ` Pratyush Yadav
2026-07-08 17:42 ` Pranjal Shrivastava
2026-07-08 14:11 ` Pratyush Yadav
2026-07-08 16:36 ` Samiullah Khawaja
2026-07-08 17:05 ` Pranjal Shrivastava
2026-07-08 17:14 ` Samiullah Khawaja
2026-07-08 17:44 ` Pranjal Shrivastava
2026-07-08 17:34 ` Pratyush Yadav
2026-07-08 17:46 ` Pranjal Shrivastava
2026-07-09 11:00 ` Mike Rapoport [this message]
2026-07-08 17:03 ` Pranjal Shrivastava
2026-07-08 17:36 ` Pratyush Yadav
2026-07-08 17:48 ` Pranjal Shrivastava
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=ak9_PDCQjNWHWCyT@kernel.org \
--to=rppt@kernel.org \
--cc=dmatlack@google.com \
--cc=graf@amazon.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pasha.tatashin@soleen.com \
--cc=praan@google.com \
--cc=pratyush@kernel.org \
--cc=skhawaja@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.