On 08/05/25 4:25 pm, David Hildenbrand wrote:
(2) Do we really need "must be part of the same folio", or could be justI am not sure I get you here. folio_pte_batch() seems to be the simplest
batch over present
ptes that map consecutive PFNs? In that case, a helper that avoids
folio_pte_batch() completely
might be better.
thing we can do as being done around in the code elsewhere, I am not
aware of any alternate.
If we don't need the folio, then we can have a batching function that
doesn't require the folio.
Likely, we could even factor that (non-folio batching) out from
folio_pte_batch().
The recent fix [1] might make that easier. See below.
So my question is: is something relying on all of these PTEs to point at
the same folio?
Hmm...get_and_clear_full_ptes, as you say in another mail, will require
that...
[1] https://lkml.kernel.org/r/20250502215019.822-2-arkamar@xxxxxxxx
Something like this: (would need kerneldoc, probably remove "addr"
parameter from folio_pte_batch(),
and look into other related cleanups as discussed with Andrew)
I like this refactoring! Can you tell the commit hash on which you make
the patch, I cannot apply it.