Thread (23 messages) 23 messages, 5 authors, 2026-02-26

Re: [PATCH 4/5] mm: support batched checking of the young flag for MGLRU

From: Baolin Wang <baolin.wang@linux.alibaba.com>
Date: 2026-02-26 09:27:27
Also in: linux-mm, lkml


On 2/26/26 5:08 PM, David Hildenbrand (Arm) wrote:
quoted
quoted
quoted
+            pte_t pteval = ptep_get(pvmw.pte);
I wonder if there could be a way to avoid this ptep_get() by letting
page_vma_mapped_walk() just provide the last value it used (in
check_pte() I guess). Something for another patch.
Well, we’d need to add a new field to ‘struct page_vma_mapped_walk’ to
store the last value (e.g., pvmw.pteval),
Yes.
quoted
but this makes me wonder if it
is worth adding a new field just to avoid a lightweight read (which
should have no obvious performance impact).
You recall that ptep_get() on arm64 is not that lightweight due to
con-pte? :)

But yeah, something for another day.
OK.
quoted
quoted
What is "batched"? Did you mean "nr_ptes" ? Or just the initial value
for "nr" ?
There is already an 'nr' variable in this function. "nr_ptes" sounds
good to me, and will use it.
You can just use "nr" here and reuse it for the existing variable?

Both have the same semantics (nr of ptes / pages), so having a single
value might cause less confusion.
Sure. Will do.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help