From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4B5C1C43458 for ; Sat, 11 Jul 2026 16:52:56 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4gyFBG5CfWz2xlb; Sun, 12 Jul 2026 02:52:54 +1000 (AEST) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.105.4.254 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1783788774; cv=none; b=T9g9JuKm2vzcDGb8+NIvLwv3Zu8vRtDFpxyxbg46tu6Za5KMSMklswCSitevSlmuxDcty0Sx21bWCr4XPW/PIpnJFCMfhwONO2e3mt+hbFwQgdmD+WJ3poGQ25L+Nal5C7bk60QBSChsz9sbQl6LEDQ+WI7pPAcxUmCsh1BAMEjN1+yV57j07bRupfnd5sQa1sOf3Z/jrBsEEpuDAVL3fKn2l9ySP8seWIaDc7R5ntH3R6kE9Ry0pByz477aQeJwZ7wkRg8IDZxNg/STod8wKoZOhsfWjc5iXrIezRytxDCxtoctGneI+V6rwZLog2igExtkSIYe1v+BppbSLw0l4w== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1783788774; c=relaxed/relaxed; bh=5+Xf1bMSkXIMJTYDDjXYIpGx0jZ6tuDdRsUChLmc1jA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fLUhKGKIhTHnixrVWdna/2uMGrXZyJu06g9wCbzoweYJd9n0aRYpDe8hTYv2MGCuCF9oTIcF8VbXhOHo7z+In8TQpha209RaS+EY1EToMUEPUiiUSaWS0tghXVn+/aiWSAFmXVbU23uWX0IGATC9kbCOpzbWMdGiqh9Fof9u6pAQG4eHB8+NqtV0GSVHypQutoiMK5Wr/JiwPq8ENBQEZZLKOqK1bac6Tk5rI4P8rVfuK748gur36ieQ5dMOAmr44qtsAfAP0RGaaGPSb98gSnFLHavCQD5oTAsBRhMl3ihGS6JnI4QR1AAJhN0x1/1SLxiw+naHmSBucNSf7tfyfg== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=GD5EgXpQ; dkim-atps=neutral; spf=pass (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=ljs@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=GD5EgXpQ; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=ljs@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4gyFBF5HV6z2xlZ for ; Sun, 12 Jul 2026 02:52:53 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id D2F3560052; Sat, 11 Jul 2026 16:52:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A36CE1F000E9; Sat, 11 Jul 2026 16:52:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1783788770; bh=5+Xf1bMSkXIMJTYDDjXYIpGx0jZ6tuDdRsUChLmc1jA=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=GD5EgXpQxjlS4BgytXhuu0DKNfOXI95UIBmT8u8vTWLN8KV7KhFG3Zmjlk9IZStJ0 KR/rJOljXFdanDu2Ju/DptezzsTHKy80EcuHZM39Fei1b18GfZiY34ebY3hxctopz9 gvnFSjPShteSKooY0iw+x0xgR3Cf925KQiGVWg1A4rsZHwFxfm3bgQE5xX0JwdPBlB +Tg/A3vkLuFYGTa7kkL8I1wMAy+xlY3+uuAHgvr+ArjH3xFFNogvxDp8/tF7Nnmmoy dKpnRq6aW4iMGj9i3sLe5ohAdOH0LwKPvhoh09eZddiNuSwIe2yzxsxY57f7rVk8Lk 0S/jqug0BXp3A== Date: Sat, 11 Jul 2026 17:52:24 +0100 From: Lorenzo Stoakes To: Zi Yan Cc: Andrew Morton , Thomas Bogendoerfer , Madhavan Srinivasan , Michael Ellerman , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Lucas Stach , Inki Dae , Seung-Woo Kim , Kyungmin Park , Krzysztof Kozlowski , Peter Griffin , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , Rob Clark , Dmitry Baryshkov , Lyude Paul , Danilo Krummrich , Tomi Valkeinen , Sandy Huang , Heiko =?utf-8?Q?St=C3=BCbner?= , Andy Yan , Thierry Reding , Mikko Perttunen , Jonathan Hunter , Gerd Hoffmann , Dmitry Osipenko , Zack Rusin , Matthew Brost , Thomas Hellstrom , Oleksandr Andrushchenko , Helge Deller , Benjamin LaHaise , Alexander Viro , Christian Brauner , Muchun Song , Oscar Salvador , David Hildenbrand , Baolin Wang , "Liam R . Howlett" , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Lance Yang , Hugh Dickins , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Jann Horn , Pedro Falcato , Kees Cook , Jaroslav Kysela , Takashi Iwai , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, dri-devel@lists.freedesktop.org, etnaviv@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, intel-gfx@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-rockchip@lists.infradead.org, linux-tegra@vger.kernel.org, virtualization@lists.linux.dev, intel-xe@lists.freedesktop.org, xen-devel@lists.xenproject.org, linux-fbdev@vger.kernel.org, linux-aio@kvack.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-sound@vger.kernel.org Subject: Re: [PATCH 11/13] mm/mlock: convert mlock code to use vma_flags_t Message-ID: References: <2db16db81538355ca65f778c246d2381c673cad4.1782760670.git.ljs@kernel.org> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: > > 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 > > --- > > 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 Thanks! > > > -- > Best Regards, > Yan, Zi > Cheers, Lorenzo