[RFC v1 2/4] kho: Adopt KHO page tables and remove serialization
Jason Miu
jasonmiu at google.com
Thu Sep 18 23:58:47 PDT 2025
Hi Mike,
Thank you very much for your comments!
On Wed, Sep 17, 2025 at 10:52 AM Mike Rapoport <rppt at kernel.org> wrote:
> > -/*
> > - * TODO: __maybe_unused is added to the functions:
> > - * kho_preserve_page_table()
> > - * kho_walk_tables()
> > - * kho_memblock_reserve()
> > - * since they are not actually being called in this change.
> > - * __maybe_unused will be removed in the next patch.
> > - */
> > -static __maybe_unused int kho_preserve_page_table(unsigned long pfn, int order)
> > +static int kho_preserve_page_table(unsigned long pfn, int order)
>
> Just merge this and the previous patch so that the patch will replace the
> current preservation mechanism with a new one.
Sure I can do this.
> > @@ -1023,12 +752,8 @@ int kho_preserve_folio(struct folio *folio)
> > {
> > const unsigned long pfn = folio_pfn(folio);
> > const unsigned int order = folio_order(folio);
> > - struct kho_mem_track *track = &kho_out.ser.track;
> > -
> > - if (kho_out.finalized)
> > - return -EBUSY;
> >
> > - return __kho_preserve_order(track, pfn, order);
> > + return kho_preserve_page_table(pfn, order);
>
> I don't think we should "rename" __kho_preserve_order() to
> kho_preserve_page_table(). __kho_preserve_order() could use the new data
> structure, or call the new implementation, but I don't see a reason to
> replace it.
>
Ok, I prefer calling the new implementation, so it will look like:
kho_preserve_folio() -> __kho_preserve_order() -> __kho_preserve_page_table()
__kho_preserve_page_table() is the internal implementation of
kho_preserve_page_table() and we can remove the
kho_preserve_page_table().
--
Jason Miu
More information about the kexec
mailing list