From: Gregory Price <gourry@gourry.net>
To: Hugh Dickins <hughd@google.com>
Cc: Shivank Garg <shivankg@amd.com>,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [PATCH] mm: use vma_policy() to get vm_policy
Date: Fri, 1 Nov 2024 09:30:37 -0400 [thread overview]
Message-ID: <ZyTX_VPXec4VThXx@PC2K9PVX.TheFacebook.com> (raw)
In-Reply-To: <8169912f-82dc-e210-862c-f6eb092db78d@google.com>
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@amd.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;
prev parent reply other threads:[~2024-11-01 13:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-01 7:13 Shivank Garg
2024-11-01 7:37 ` Hugh Dickins
2024-11-01 13:30 ` Gregory Price [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZyTX_VPXec4VThXx@PC2K9PVX.TheFacebook.com \
--to=gourry@gourry.net \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shivankg@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox