Re: [PATCH 2/2] mm: mincore: use folio_pte_batch() to batch process large folios
From: Oscar Salvador
Date: Fri Mar 28 2025 - 09:10:47 EST
On Thu, Mar 27, 2025 at 10:08:56AM -0400, Ryan Roberts wrote:
> You could simplify to the following, I think, to avoid needing to grab the folio
> and call folio_pte_batch():
>
> else if (pte_present(pte)) {
> int max_nr = (end - addr) / PAGE_SIZE;
> step = min(pte_batch_hint(ptep, pte), max_nr);
> } ...
Yes, I think this makes much more sense, in the end, as you said, we do
not really need what folio_pte_batch gives us here.
With the API I am working on, batching will be done in there internally,
so we will not have to expose this here.
--
Oscar Salvador
SUSE Labs