Thread (114 messages) flat view 114 messages, 9 authors, 2026-06-05

Re: [PATCH mm-unstable v18 06/14] mm/khugepaged: generalize collapse_huge_page for mTHP collapse

From: "David Hildenbrand (Arm)" <david@kernel.org>
Date: 2026-06-01 11:13:59
Also in: linux-doc, linux-mm, lkml

On 6/1/26 12:47, Lance Yang wrote:

On 2026/6/1 18:23, David Hildenbrand (Arm) wrote:
quoted
On 6/1/26 11:08, Lance Yang wrote:
quoted


One small thing, I think we should probably keep the smp_wmb(), and just
move it before the earlier pmd_populate().

IIUC, the ordering we want is still:

   clear old PTEs
   smp_wmb()
   pmd_populate()

so another CPU cannot walk through the re-installed PMD and still observe
the old PTEs, right?
There is a smp_wmb() in __folio_mark_uptodate(), that should be sufficient?
Ah, cool! __folio_mark_uptodate() already does the job :P

So yeah, no extra smp_wmb() needed here!
Yeah. BTW, I think we'd need a spin_lock_nested(), so @Nico, treat my code as a
draft.

-- 
Cheers,

David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help