Thread (33 messages) 33 messages, 7 authors, 2026-06-16

Re: [PATCH v2 3/5] mm: Add RCU-based VMA lookup helper that waits for writers

From: Dave Hansen <hidden>
Date: 2026-06-11 21:04:06
Also in: linux-mm, lkml

On 6/11/26 13:35, Suren Baghdasaryan wrote:
quoted
+       /* Slow path: preclude VMA writers by getting mmap read lock. */
+       guard(rwsem_read)(&mm->mmap_lock);
guard() is nice but mmap_read_{lock|unlock} has those
__mmap_lock_trace_* traces which we lose with guard(). Not sure if
that's a good enough reason to keep using older primitives.
I stole the guard() from Lorenzo's suggestion. I'm totally fine doing it
whichever way you two would prefer.

I'm old school but I personally find guard() harder to read. I tend to
only use it where it is *vastly* superior to explicit lock/unlock. But,
seriously, I'm open to whatever folks want.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help