Re: [PATCH v4 0/2] kho: support preserving high-order non-compound pages

From: Mike Rapoport

Date: Thu Aug 13 2026 - 07:40:47 EST


On Wed, Aug 12, 2026 at 03:46:20PM +0200, Pratyush Yadav wrote:
> On Wed, Aug 12 2026, Pranjal Shrivastava wrote:
>
> > On Wed, Aug 12, 2026 at 12:32:25PM +0200, Pratyush Yadav wrote:
> >> On Tue, Aug 11 2026, Mike Rapoport wrote:
> >>
> >> > Hi Pranjal,
> >> >
> >> > On Mon, Aug 03, 2026 at 11:39:41AM +0000, Pranjal Shrivastava wrote:
> >> >> Introduction
> >> >> ============
> >> >> This series is required for the ongoing effort to preserve DMA allocations
> >> >> across KHO [1]. It addresses a fundamental mismatch between the current KHO
> >> >> restoration logic and the physical reality of high-order buddy allocations.
> >> >
> >> > I skimmed through the patches, they look fine to me before the in-depth
> >> > review :)
> >> >
> >> > But we are really close to the merge window, so we'll anyway need to
> >> > reiterate after v7.3-rc1.
> >> >
> >> >> The Problem
> >> >> ===========
> >> >> The current KHO restore implementation treats all multi-page blocks as
> >> >> split pages during restoration. Specifically, kho_restore_pages()
> >> >> initializes every 4KB sub-page with a refcount of 1.
> >> >>
> >> >> However, many kernel subsystems, most notably the DMA allocator (via
> >> >> dma_alloc_coherent), frequently return high-order non-compound pages.
> >> >> In this state, only the head page carries a refcount of 1, while
> >> >> all tail pages have a refcount of 0.
> >> >
> >> > This hints that these patches could be a part of the DMA preservation
> >> > series, unless you expect other users of the new API.
> >> >
> >> > Generally, we don't merge new APIs without the users and if DMA
> >> > preservation is the only user, it's better to fold these two patches there.
> >>
> >> Makes sense I think. We can review the patches here, but then they can
> >> go in with the DMA series.
> >>
> >
> > So.. IIUC, I'll post a v5 here as a standalone series till we get
> > consensus, and finally the reviewed patches can be folded with the DMA
> > series?
>
> That sounds good to me at least.

Yes, although when the patches will be a part of the DMA series we might
notices something else :)

> --
> Regards,
> Pratyush Yadav

--
Sincerely yours,
Mike.