From: Pratyush Yadav <pratyush@kernel.org>
To: Mike Rapoport <rppt@kernel.org>
Cc: Jason Miu <jasonmiu@google.com>,
Alexander Graf <graf@amazon.com>,
Andrew Morton <akpm@linux-foundation.org>,
Baoquan He <bhe@redhat.com>,
Changyuan Lyu <changyuanl@google.com>,
David Matlack <dmatlack@google.com>,
David Rientjes <rientjes@google.com>,
Jason Gunthorpe <jgg@nvidia.com>,
Joel Granados <joel.granados@kernel.org>,
Marcos Paulo de Souza <mpdesouza@suse.com>,
Mario Limonciello <mario.limonciello@amd.com>,
Pasha Tatashin <pasha.tatashin@soleen.com>,
Petr Mladek <pmladek@suse.com>,
"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
Steven Chen <chenste@linux.microsoft.com>,
Yan Zhao <yan.y.zhao@intel.com>,
kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [RFC v1 0/4] Make KHO Stateless
Date: Thu, 25 Sep 2025 14:27:06 +0200 [thread overview]
Message-ID: <mafs05xd6d8f9.fsf@kernel.org> (raw)
In-Reply-To: <aNUJIsElr5L5uxNv@kernel.org> (Mike Rapoport's message of "Thu, 25 Sep 2025 12:19:30 +0300")
On Thu, Sep 25 2025, Mike Rapoport wrote:
> Hi Jason,
>
> On Tue, Sep 16, 2025 at 07:50:15PM -0700, Jason Miu wrote:
>> This series transitions KHO from an xarray-based metadata tracking
>> system with serialization to using page table like data structures
>> that can be passed directly to the next kernel.
>>
>> The key motivations for this change are to:
>> - Eliminate the need for data serialization before kexec.
>> - Remove the former KHO state machine by deprecating the finalize
>> and abort states.
>> - Pass preservation metadata more directly to the next kernel via the FDT.
>
> If we pass the preservation metadata directly between the kernels, it means
> that any change to that data structure will break compatibility between the
> new and old kernels. With serialization this is less severe because a more
> recent kernel can relatively easy have backward compatible deserialization.
>
> I'm all for removing KHO state machine, but that does not necessarily mean
> we must remove the serialization of memory persistence metadata?
I think the tables should be treated as the final serialized data
structure, and should get all the same properties that other KHO
serialization formats have like stable binary format, versioning, etc.
It just so happens that the table format lends itself very well to being
serialized on-the-go. When a page is marked as preserved during normal
operation, it is very simple to just allocate all the intermediate
levels and mark the page as reserved. There is no further processing
needed to "serialize" it -- like we need to do with the bitmaps today.
So I don't really see why we should introduce an intermediate processing
step when it is easy to just directly build the serialized data
structure during normal operation.
>
> For example, we can do the serialization at kernel_kexec() time and if we
> want to avoid memory allocations there we might preallocate pages for
> khoser_mem_chunk's as amount of bitmaps grow.
>
> It also would be interesting to see how much time is saved if we remove the
> serialization.
--
Regards,
Pratyush Yadav
next prev parent reply other threads:[~2025-09-25 12:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-17 2:50 Jason Miu
2025-09-17 2:50 ` [RFC v1 1/4] kho: Introduce KHO page table data structures Jason Miu
2025-09-17 12:21 ` Jason Gunthorpe
2025-09-17 16:18 ` Pasha Tatashin
2025-09-17 16:32 ` Jason Gunthorpe
2025-09-19 6:49 ` Jason Miu
2025-09-19 12:56 ` Jason Gunthorpe
2025-09-17 2:50 ` [RFC v1 2/4] kho: Adopt KHO page tables and remove serialization Jason Miu
2025-09-17 17:52 ` Mike Rapoport
2025-09-19 6:58 ` Jason Miu
2025-09-17 2:50 ` [RFC v1 3/4] memblock: Remove KHO notifier usage Jason Miu
2025-09-17 2:50 ` [RFC v1 4/4] kho: Remove notifier system infrastructure Jason Miu
2025-09-17 11:36 ` [RFC v1 0/4] Make KHO Stateless Jason Gunthorpe
2025-09-17 14:48 ` Pasha Tatashin
2025-09-21 22:26 ` Matthew Wilcox
2025-09-21 23:07 ` Pasha Tatashin
2025-09-25 9:19 ` Mike Rapoport
2025-09-25 12:27 ` Pratyush Yadav [this message]
2025-09-25 12:33 ` Jason Gunthorpe
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=mafs05xd6d8f9.fsf@kernel.org \
--to=pratyush@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=changyuanl@google.com \
--cc=chenste@linux.microsoft.com \
--cc=dmatlack@google.com \
--cc=graf@amazon.com \
--cc=jasonmiu@google.com \
--cc=jgg@nvidia.com \
--cc=joel.granados@kernel.org \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mario.limonciello@amd.com \
--cc=mpdesouza@suse.com \
--cc=pasha.tatashin@soleen.com \
--cc=pmladek@suse.com \
--cc=rafael.j.wysocki@intel.com \
--cc=rientjes@google.com \
--cc=rppt@kernel.org \
--cc=yan.y.zhao@intel.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