Thread (63 messages) 63 messages, 5 authors, 1d ago

Re: [PATCH 11/13] mm/mlock: convert mlock code to use vma_flags_t

From: Lorenzo Stoakes <ljs@kernel.org>
Date: 2026-07-11 16:52:55
Also in: dri-devel, intel-gfx, intel-xe, linux-arm-msm, linux-fbdev, linux-fsdevel, linux-mips, linux-mm, linux-samsung-soc, linux-sound, linux-tegra, lkml, nouveau, virtualization, xen-devel

On Wed, Jul 08, 2026 at 10:01:22PM -0400, Zi Yan wrote:
On Mon Jun 29, 2026 at 3:25 PM EDT, Lorenzo Stoakes wrote:
quoted
Replace use of the legacy vm_flags_t flags with vma_flags_t values
throughout the mlock logic.

Additionally update comments to reflect the changes to be consistent.

No functional change intended.

Signed-off-by: Lorenzo Stoakes <ljs@kernel.org>
---
 mm/mlock.c | 86 +++++++++++++++++++++++++++++-------------------------
 1 file changed, 46 insertions(+), 40 deletions(-)
LGTM. What confused me when I was reading the code is VMA_LOCKED_MASK
and VMA_LOCKED_BIT, since both share the same prefix VMA_LOCKED. Before
looking at the definition of VMA_LOCKED_MASK, I was wondering when to
use _BIT or _MASK. But it is just a naming thing.
Yeah, indeed, not great naming there. Was a pre-existing though, and previously
was VM_LOCKED_MASK (also not great :)

The whole VMA_LOCKED_BIT and VMA_LOCK_ON_FAULT_BIT thing is a bit weird anyway,
since you set both and then just use the latter to know not to fault in in
GUP... anyway, can revisit that one later...! :)
Anyway,

Reviewed-by: Zi Yan <ziy@nvidia.com>
Thanks!

--
Best Regards,
Yan, Zi
Cheers, Lorenzo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help