The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Pratyush Yadav <pratyush@kernel.org>
To: Mike Rapoport <rppt@kernel.org>
Cc: Pranjal Shrivastava <praan@google.com>,
	 Pasha Tatashin <pasha.tatashin@soleen.com>,
	 Pratyush Yadav <pratyush@kernel.org>,
	Alexander Graf <graf@amazon.com>,
	 Samiullah Khawaja <skhawaja@google.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: Wed, 08 Jul 2026 16:34:08 +0200	[thread overview]
Message-ID: <2vxz33xtmty7.fsf@kernel.org> (raw)
In-Reply-To: <178341290876.3292146.16538284698967245356.b4-review@b4> (Mike Rapoport's message of "Tue, 07 Jul 2026 11:28:28 +0300")

On Tue, Jul 07 2026, Mike Rapoport wrote:
>> 2. The type bit is preserved in the high bits of the KHO radix tree key
>>    (Bit 63) and stashed in page->private metadata during boot.
>
> This brings a broader question - what is the best way to deal with page
> metadata. This particular case requires only a single bit and luckily we
> have a few spare high bits in the radix tree key. But what if going
> forward we'll need more than a few bits? Do we need a parallel data
> structure for the page metadata? Or something in kho_radix_leaf in
> addition to the bitmap?

FWIW, I am not convinced we need the extra bit of metadata _in this
case_ [0]. But in general, I think the answer depends on how many pages
need that metadata.

Storing it in the key has a side effect because it increases the memory
usage. Since the keys will be more spread apart due to the metadata
bits, it will result in more radix table pages being allocated.

If we need the metadata for each preservation, I'd guess we should just
change the leaf nodes to have more bits per key instead of just one. If
the metadata is fairly rare, maybe we just do a parallel data structure.
Although parallel data structures do run the risk of going out of sync.

So I guess it depends on the use case, as always...

[0] https://lore.kernel.org/kexec/2vxz7bn5mv0n.fsf@kernel.org/

>
> I'm not saying that a generic solution for page metadata must be a part
> of this series, but we definitely need to consider and better sooner
> than later.

-- 
Regards,
Pratyush Yadav

  reply	other threads:[~2026-07-08 14:34 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 [this message]
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
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=2vxz33xtmty7.fsf@kernel.org \
    --to=pratyush@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=rppt@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox