linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hu Song <husong@kylinos.cn>
To: Andrew Morton <akpm@linux-foundation.org>,
	Vlastimil Babka <vbabka@suse.cz>
Cc: Song Hu <husong@kylinos.cn>,
	Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>,
	Brendan Jackman <jackmanb@google.com>,
	Johannes Weiner <hannes@cmpxchg.org>, Zi Yan <ziy@nvidia.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] mm/page_owner: Rename proc-prefixed variables for clarity
Date: Tue, 30 Sep 2025 17:21:51 +0800	[thread overview]
Message-ID: <20250930092153.843109-1-husong@kylinos.cn> (raw)

From: Song Hu <husong@kylinos.cn>

The `proc_page_owner_operations` and related variables were renamed to
`page_owner_fops` to better reflect their association with `debugfs` rather
than `/proc`. This improves code clarity and aligns with kernel naming
conventions.

Signed-off-by: Song Hu <husong@kylinos.cn>
---
 mm/page_owner.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/mm/page_owner.c b/mm/page_owner.c
index c3ca21132c2c..bb88b72b6062 100644
--- a/mm/page_owner.c
+++ b/mm/page_owner.c
@@ -848,7 +848,7 @@ static void init_early_allocated_pages(void)
 		init_zones_in_node(pgdat);
 }
 
-static const struct file_operations proc_page_owner_operations = {
+static const struct file_operations page_owner_fops = {
 	.read		= read_page_owner,
 	.llseek		= lseek_page_owner,
 };
@@ -929,7 +929,7 @@ static int page_owner_stack_open(struct inode *inode, struct file *file)
 	return seq_open_private(file, &page_owner_stack_op, 0);
 }
 
-static const struct file_operations page_owner_stack_operations = {
+static const struct file_operations page_owner_stack_fops = {
 	.open		= page_owner_stack_open,
 	.read		= seq_read,
 	.llseek		= seq_lseek,
@@ -948,7 +948,7 @@ static int page_owner_threshold_set(void *data, u64 val)
 	return 0;
 }
 
-DEFINE_SIMPLE_ATTRIBUTE(proc_page_owner_threshold, &page_owner_threshold_get,
+DEFINE_SIMPLE_ATTRIBUTE(page_owner_threshold_fops, &page_owner_threshold_get,
 			&page_owner_threshold_set, "%llu");
 
 
@@ -961,13 +961,12 @@ static int __init pageowner_init(void)
 		return 0;
 	}
 
-	debugfs_create_file("page_owner", 0400, NULL, NULL,
-			    &proc_page_owner_operations);
+	debugfs_create_file("page_owner", 0400, NULL, NULL, &page_owner_fops);
 	dir = debugfs_create_dir("page_owner_stacks", NULL);
 	debugfs_create_file("show_stacks", 0400, dir, NULL,
-			    &page_owner_stack_operations);
+			     &page_owner_stack_fops);
 	debugfs_create_file("count_threshold", 0600, dir, NULL,
-			    &proc_page_owner_threshold);
+			    &page_owner_threshold_fops);
 
 	return 0;
 }
-- 
2.25.1



             reply	other threads:[~2025-09-30  9:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-30  9:21 Hu Song [this message]
2025-09-30  9:21 ` [PATCH 2/2] mm/page_owner: simplify zone iteration logic in init_early_allocated_pages() Hu Song
2025-10-01 13:47   ` Vlastimil Babka
2025-10-02  2:00   ` Ye Liu
2025-10-01 13:19 ` [PATCH 1/2] mm/page_owner: Rename proc-prefixed variables for clarity Vlastimil Babka
2025-10-02  1:58 ` Ye Liu

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=20250930092153.843109-1-husong@kylinos.cn \
    --to=husong@kylinos.cn \
    --cc=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@suse.cz \
    --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