Re: [RFC PATCH 2/4] kho: Detect preserved page types
Mike Rapoport <[email protected]>
| Newsgroups | org.infradead.lists.kexec,org.kernel.vger.linux-kernel,org.kvack.linux-mm |
|---|---|
| Message-ID | <178341290876.3292146.918384529988808795.b4-review@b4> |
> Detect page types in kho_preserve_pages() by peeking into the refcount > of the second page in each block of order > 0. If the second page has > a non-zero reference count, it indicates that the block has been split. > Otherwise, treated it as a contiguous, unsplit block. > > Since the page type is now part of the radix tree key, update the > unpreserve path to use the same detection logic to ensure it can > correctly locate and delete existing entries. > > Signed-off-by: Pranjal Shrivastava <[email protected]> > > diff --git a/kernel/liveupdate/kexec_handover.c b/kernel/liveupdate/kexec_handover.c > index f829ffdd00f45..d6e81f72fe5de 100644 > --- a/kernel/liveupdate/kexec_handover.c > +++ b/kernel/liveupdate/kexec_handover.c > @@ -918,15 +918,29 @@ static unsigned int __kho_preserve_pages_order(unsigned long start_pfn, > return order; > } > > +static bool kho_is_page_split(unsigned long pfn, unsigned int order) You can return enum kho_page_type here directly (and rename the function accordingly). -- Sincerely yours, Mike.