From: Wei Yang <richard.weiyang@gmail.com>
To: akpm@linux-foundation.org, david@kernel.org,
lorenzo.stoakes@oracle.com, Liam.Howlett@oracle.com,
vbabka@suse.cz, rppt@kernel.org, surenb@google.com,
mhocko@suse.com
Cc: linux-mm@kvack.org, Wei Yang <richard.weiyang@gmail.com>,
Joshua Hahn <joshua.hahnjy@gmail.com>
Subject: [Patch v2] mm/vmstat: remove unused node and zone state helpers
Date: Thu, 25 Dec 2025 21:02:13 +0000 [thread overview]
Message-ID: <20251225210213.2553-1-richard.weiyang@gmail.com> (raw)
Several helper functions for managing node and zone states have become
obsolete and no longer have any callers within the kernel.
inc_node_state()
inc_zone_state()
dec_zone_state()
This commit removes the dead code.
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Cc: Joshua Hahn <joshua.hahnjy@gmail.com>
---
include/linux/vmstat.h | 6 ------
mm/vmstat.c | 15 ---------------
2 files changed, 21 deletions(-)
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
index 3398a345bda8..cf559e2ce1d4 100644
--- a/include/linux/vmstat.h
+++ b/include/linux/vmstat.h
@@ -286,10 +286,8 @@ void mod_node_page_state(struct pglist_data *, enum node_stat_item, long);
void inc_node_page_state(struct page *, enum node_stat_item);
void dec_node_page_state(struct page *, enum node_stat_item);
-extern void inc_node_state(struct pglist_data *, enum node_stat_item);
extern void __inc_zone_state(struct zone *, enum zone_stat_item);
extern void __inc_node_state(struct pglist_data *, enum node_stat_item);
-extern void dec_zone_state(struct zone *, enum zone_stat_item);
extern void __dec_zone_state(struct zone *, enum zone_stat_item);
extern void __dec_node_state(struct pglist_data *, enum node_stat_item);
@@ -394,10 +392,6 @@ static inline void __dec_node_page_state(struct page *page,
#define dec_node_page_state __dec_node_page_state
#define mod_node_page_state __mod_node_page_state
-#define inc_zone_state __inc_zone_state
-#define inc_node_state __inc_node_state
-#define dec_zone_state __dec_zone_state
-
#define set_pgdat_percpu_threshold(pgdat, callback) { }
static inline void refresh_zone_stat_thresholds(void) { }
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 090b5c5294b9..16b7cb24d411 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -671,11 +671,6 @@ void mod_node_page_state(struct pglist_data *pgdat, enum node_stat_item item,
}
EXPORT_SYMBOL(mod_node_page_state);
-void inc_node_state(struct pglist_data *pgdat, enum node_stat_item item)
-{
- mod_node_state(pgdat, item, 1, 1);
-}
-
void inc_node_page_state(struct page *page, enum node_stat_item item)
{
mod_node_state(page_pgdat(page), item, 1, 1);
@@ -724,16 +719,6 @@ void dec_zone_page_state(struct page *page, enum zone_stat_item item)
}
EXPORT_SYMBOL(dec_zone_page_state);
-void inc_node_state(struct pglist_data *pgdat, enum node_stat_item item)
-{
- unsigned long flags;
-
- local_irq_save(flags);
- __inc_node_state(pgdat, item);
- local_irq_restore(flags);
-}
-EXPORT_SYMBOL(inc_node_state);
-
void mod_node_page_state(struct pglist_data *pgdat, enum node_stat_item item,
long delta)
{
--
2.34.1
next reply other threads:[~2025-12-25 21:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-25 21:02 Wei Yang [this message]
2025-12-27 5:49 ` Joshua Hahn
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=20251225210213.2553-1-richard.weiyang@gmail.com \
--to=richard.weiyang@gmail.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=joshua.hahnjy@gmail.com \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
/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