public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Zhen Ni <zhen.ni@easystack.cn>
Cc: vbabka@kernel.org, surenb@google.com, mhocko@suse.com,
	jackmanb@google.com, hannes@cmpxchg.org, ziy@nvidia.com,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] mm/page_owner: add NUMA node filter with nodelist support
Date: Fri, 24 Apr 2026 13:15:02 -0700	[thread overview]
Message-ID: <20260424131502.3143b9cb291a4e6817aa9ed7@linux-foundation.org> (raw)
In-Reply-To: <20260419155540.376847-4-zhen.ni@easystack.cn>

On Sun, 19 Apr 2026 23:55:40 +0800 Zhen Ni <zhen.ni@easystack.cn> wrote:

> Add NUMA node filtering functionality to page_owner to allow
> filtering pages by specific NUMA node(s) using nodelist format.
> 
> The filter allows users to focus on pages from specific NUMA nodes,
> which is useful for NUMA-aware memory allocation analysis and debugging.

AI review
(https://sashiko.dev/#/patchset/20260419155540.376847-1-zhen.ni@easystack.cn)
wonders if it's legitimate to use READ_ONCE/WRITE_ONCE against a
nodemask_t.  And indeed, my x86_64 allmodconfig hit compile time
asserts over this.

So I took them out:

--- a/mm/page_owner.c~mm-page_owner-add-numa-node-filter-with-nodelist-support-fix
+++ a/mm/page_owner.c
@@ -732,7 +732,7 @@ read_page_owner(struct file *file, char
 			continue;
 
 		/* NUMA node filter using bitmask */
-		mask = READ_ONCE(owner_filter.nid_mask);
+		mask = owner_filter.nid_mask;
 		if (!nodes_empty(mask)) {
 			int nid = page_to_nid(page);
 
@@ -1049,7 +1049,7 @@ static ssize_t nid_filter_write(struct f
 		goto out_free;
 	}
 
-	WRITE_ONCE(owner_filter.nid_mask, mask);
+	owner_filter.nid_mask = mask;
 	ret = count;
 
 out_free:
@@ -1059,7 +1059,7 @@ out_free:
 
 static int nid_filter_show(struct seq_file *m, void *v)
 {
-	nodemask_t mask = READ_ONCE(owner_filter.nid_mask);
+	nodemask_t mask = owner_filter.nid_mask;
 
 	if (nodes_empty(mask))
 		seq_puts(m, "-1\n");
_



  parent reply	other threads:[~2026-04-24 20:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-19 15:55 [PATCH v2 0/3] mm/page_owner: add filter infrastructure for print_mode and NUMA filtering Zhen Ni
2026-04-19 15:55 ` [PATCH v2 1/3] mm/page_owner: add filter infrastructure Zhen Ni
2026-04-27 15:35   ` Zi Yan
2026-04-28  3:33     ` zhen.ni
2026-04-28 13:13       ` Zi Yan
2026-04-29  1:39         ` SeongJae Park
2026-04-29 11:22         ` zhen.ni
2026-04-29 11:28           ` Zi Yan
2026-04-19 15:55 ` [PATCH v2 2/3] mm/page_owner: add print_mode filter Zhen Ni
2026-04-27 15:43   ` Zi Yan
2026-04-28  3:36     ` zhen.ni
2026-04-28 13:20       ` Zi Yan
2026-04-29 11:42         ` zhen.ni
2026-04-19 15:55 ` [PATCH v2 3/3] mm/page_owner: add NUMA node filter with nodelist support Zhen Ni
2026-04-24 11:26   ` Andrew Morton
2026-04-24 20:15   ` Andrew Morton [this message]
2026-04-24 11:27 ` [PATCH v2 0/3] mm/page_owner: add filter infrastructure for print_mode and NUMA filtering Andrew Morton
2026-04-24 14:09 ` Andrew Morton

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=20260424131502.3143b9cb291a4e6817aa9ed7@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=jackmanb@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    --cc=zhen.ni@easystack.cn \
    --cc=ziy@nvidia.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