From: Pasha Tatashin <pasha.tatashin@soleen.com>
To: Pratyush Yadav <pratyush@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Alexander Graf <graf@amazon.com>,
Mike Rapoport <rppt@kernel.org>,
kexec@lists.infradead.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
Suren Baghdasaryan <surenb@google.com>
Subject: Re: [PATCH v2 1/2] kho: use unsigned long for nr_pages
Date: Thu, 22 Jan 2026 14:08:51 -0500 [thread overview]
Message-ID: <CA+CK2bAsGHDQGm7t43MPTS7jCSHVdfvyTZ3Oj2Qnx6G=8N-P-g@mail.gmail.com> (raw)
In-Reply-To: <20260116112217.915803-2-pratyush@kernel.org>
> @@ -222,7 +222,8 @@ static int __kho_preserve_order(struct kho_mem_track *track, unsigned long pfn,
> static struct page *kho_restore_page(phys_addr_t phys, bool is_folio)
> {
> struct page *page = pfn_to_online_page(PHYS_PFN(phys));
> - unsigned int nr_pages, ref_cnt;
> + unsigned long nr_pages;
> + unsigned int ref_cnt;
> union kho_page_info info;
>
> if (!page)
> @@ -249,7 +250,7 @@ static struct page *kho_restore_page(phys_addr_t phys, bool is_folio)
> * count of 1
> */
> ref_cnt = is_folio ? 0 : 1;
> - for (unsigned int i = 1; i < nr_pages; i++)
> + for (unsigned long i = 1; i < nr_pages; i++)
> set_page_count(page + i, ref_cnt);
>
> if (is_folio && info.order)
> @@ -283,7 +284,7 @@ EXPORT_SYMBOL_GPL(kho_restore_folio);
> *
> * Return: 0 on success, error code on failure
> */
> -struct page *kho_restore_pages(phys_addr_t phys, unsigned int nr_pages)
> +struct page *kho_restore_pages(phys_addr_t phys, unsigned long nr_pages)
> {
> const unsigned long start_pfn = PHYS_PFN(phys);
> const unsigned long end_pfn = start_pfn + nr_pages;
> @@ -829,7 +830,7 @@ EXPORT_SYMBOL_GPL(kho_unpreserve_folio);
> *
> * Return: 0 on success, error code on failure
> */
> -int kho_preserve_pages(struct page *page, unsigned int nr_pages)
> +int kho_preserve_pages(struct page *page, unsigned long nr_pages)
> {
> struct kho_mem_track *track = &kho_out.track;
> const unsigned long start_pfn = page_to_pfn(page);
> @@ -873,7 +874,7 @@ EXPORT_SYMBOL_GPL(kho_preserve_pages);
> * kho_preserve_pages() call. Unpreserving arbitrary sub-ranges of larger
> * preserved blocks is not supported.
> */
> -void kho_unpreserve_pages(struct page *page, unsigned int nr_pages)
> +void kho_unpreserve_pages(struct page *page, unsigned long nr_pages)
Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
next prev parent reply other threads:[~2026-01-22 19:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-16 11:22 [PATCH v2 0/2] kho: clean up page initialization logic Pratyush Yadav
2026-01-16 11:22 ` [PATCH v2 1/2] kho: use unsigned long for nr_pages Pratyush Yadav
2026-01-16 22:26 ` Andrew Morton
2026-01-20 13:06 ` Mike Rapoport
2026-01-20 13:03 ` Mike Rapoport
2026-01-22 19:08 ` Pasha Tatashin [this message]
2026-01-16 11:22 ` [PATCH v2 2/2] kho: simplify page initialization in kho_restore_page() Pratyush Yadav
2026-01-20 13:05 ` Mike Rapoport
2026-01-22 19:11 ` Pasha Tatashin
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='CA+CK2bAsGHDQGm7t43MPTS7jCSHVdfvyTZ3Oj2Qnx6G=8N-P-g@mail.gmail.com' \
--to=pasha.tatashin@soleen.com \
--cc=akpm@linux-foundation.org \
--cc=graf@amazon.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pratyush@kernel.org \
--cc=rppt@kernel.org \
--cc=surenb@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