[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZyTX_VPXec4VThXx@PC2K9PVX.TheFacebook.com>
Date: Fri, 1 Nov 2024 09:30:37 -0400
From: Gregory Price <gourry@...rry.net>
To: Hugh Dickins <hughd@...gle.com>
Cc: Shivank Garg <shivankg@....com>, akpm@...ux-foundation.org,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH] mm: use vma_policy() to get vm_policy
On Fri, Nov 01, 2024 at 12:37:45AM -0700, Hugh Dickins wrote:
> On Fri, 1 Nov 2024, Shivank Garg wrote:
> 
> > Instead of accessing vma->vm_policy directly, use vma_policy() like
> > other places for consistency.
> > 
> > Signed-off-by: Shivank Garg <shivankg@....com>
> 
> NAK.  The vma_policy(vma) wrapper exists to avoid #ifdef CONFIG_NUMAs
> all over the place; there is no point to it inside CONFIG_NUMA source.
> 
> Hugh
>
In that case we should do the opposite of this patch inside mempolicy.c
Only 1 place to update
~Gregory
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index b858e22b259d..beffdc17aad5 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -1572,7 +1572,7 @@ SYSCALL_DEFINE4(set_mempolicy_home_node, unsigned long, start, unsigned long, le
                 * or MPOL_PREFERRED_MANY we return error. We don't reset
                 * the home node for vmas we already updated before.
                 */
-               old = vma_policy(vma);
+               old = vma->vm_policy;
                if (!old) {
                        prev = vma;
                        continue; 
Powered by blists - more mailing lists
 
