* [PATCH 0/2] mm: memcontrol: remove two unused helpers
@ 2026-10-14 17:08 Tal Zussman
2026-10-14 17:08 ` [PATCH 1/2] mm: memcontrol: remove mod_memcg_page_state() Tal Zussman
2026-10-14 17:08 ` [PATCH 2/2] mm: memcontrol: remove page_memcg_check() Tal Zussman
0 siblings, 2 replies; 9+ messages in thread
From: Tal Zussman @ 2026-10-14 17:08 UTC (permalink / raw)
To: Johannes Weiner, Michal Hocko, Roman Gushchin, Shakeel Butt,
Muchun Song
Cc: cgroups, linux-mm, linux-kernel, Tal Zussman
They were happily unused until I decided to disturb their peace.
---
Tal Zussman (2):
mm: memcontrol: remove mod_memcg_page_state()
mm: memcontrol: remove page_memcg_check()
include/linux/memcontrol.h | 32 --------------------------------
1 file changed, 32 deletions(-)
---
base-commit: ad9f2d463666c64e94b04be5263c9bf8f9f96fb7
change-id: 20261014-memcg-unused-page-helpers-c43a866ee0ba
Best regards,
--
Tal Zussman <tz2294@columbia.edu>
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH 1/2] mm: memcontrol: remove mod_memcg_page_state() 2026-10-14 17:08 [PATCH 0/2] mm: memcontrol: remove two unused helpers Tal Zussman @ 2026-10-14 17:08 ` Tal Zussman 2026-10-14 18:08 ` Harry Yoo ` (2 more replies) 2026-10-14 17:08 ` [PATCH 2/2] mm: memcontrol: remove page_memcg_check() Tal Zussman 1 sibling, 3 replies; 9+ messages in thread From: Tal Zussman @ 2026-10-14 17:08 UTC (permalink / raw) To: Johannes Weiner, Michal Hocko, Roman Gushchin, Shakeel Butt, Muchun Song Cc: cgroups, linux-mm, linux-kernel, Tal Zussman The last caller was removed in commit c466412c73c3 ("mm: memcontrol: switch to native NR_VMALLOC vmstat counter"). Remove it. Signed-off-by: Tal Zussman <tz2294@columbia.edu> --- include/linux/memcontrol.h | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 74110a324f9e..b65a2d0fca3a 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -957,21 +957,6 @@ void mem_cgroup_print_oom_group(struct mem_cgroup *memcg); void mod_memcg_state(struct mem_cgroup *memcg, enum memcg_stat_item idx, int val); -static inline void mod_memcg_page_state(const struct page *page, - enum memcg_stat_item idx, int val) -{ - struct mem_cgroup *memcg; - - if (mem_cgroup_disabled()) - return; - - rcu_read_lock(); - memcg = folio_memcg(page_folio(page)); - if (memcg) - mod_memcg_state(memcg, idx, val); - rcu_read_unlock(); -} - unsigned long memcg_events(const struct mem_cgroup *memcg, int event); unsigned long memcg_page_state(const struct mem_cgroup *memcg, int idx); unsigned long memcg_page_state_output(const struct mem_cgroup *memcg, int item); @@ -1412,11 +1397,6 @@ static inline void mod_memcg_state(struct mem_cgroup *memcg, { } -static inline void mod_memcg_page_state(const struct page *page, - enum memcg_stat_item idx, int val) -{ -} - static inline unsigned long memcg_page_state(const struct mem_cgroup *memcg, int idx) { return 0; -- 2.39.5 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] mm: memcontrol: remove mod_memcg_page_state() 2026-10-14 17:08 ` [PATCH 1/2] mm: memcontrol: remove mod_memcg_page_state() Tal Zussman @ 2026-10-14 18:08 ` Harry Yoo 2026-10-14 18:25 ` Shakeel Butt 2026-10-14 20:30 ` Johannes Weiner 2 siblings, 0 replies; 9+ messages in thread From: Harry Yoo @ 2026-10-14 18:08 UTC (permalink / raw) To: Tal Zussman Cc: Johannes Weiner, Michal Hocko, Roman Gushchin, Shakeel Butt, Muchun Song, cgroups, linux-mm, linux-kernel On Wed, Oct 14, 2026 at 01:08:20PM -0400, Tal Zussman wrote: > The last caller was removed in commit c466412c73c3 ("mm: memcontrol: > switch to native NR_VMALLOC vmstat counter"). Remove it. > > Signed-off-by: Tal Zussman <tz2294@columbia.edu> > --- Looks good to me, Reviewed-by: Harry Yoo (Meta) <harry@kernel.org> -- Cheers, Harry / Hyeonggon ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] mm: memcontrol: remove mod_memcg_page_state() 2026-10-14 17:08 ` [PATCH 1/2] mm: memcontrol: remove mod_memcg_page_state() Tal Zussman 2026-10-14 18:08 ` Harry Yoo @ 2026-10-14 18:25 ` Shakeel Butt 2026-10-14 20:30 ` Johannes Weiner 2 siblings, 0 replies; 9+ messages in thread From: Shakeel Butt @ 2026-10-14 18:25 UTC (permalink / raw) To: Tal Zussman Cc: Johannes Weiner, Michal Hocko, Roman Gushchin, Muchun Song, cgroups, linux-mm, linux-kernel On Wed, Oct 14, 2026 at 01:08:20PM -0400, Tal Zussman wrote: > The last caller was removed in commit c466412c73c3 ("mm: memcontrol: > switch to native NR_VMALLOC vmstat counter"). Remove it. > > Signed-off-by: Tal Zussman <tz2294@columbia.edu> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] mm: memcontrol: remove mod_memcg_page_state() 2026-10-14 17:08 ` [PATCH 1/2] mm: memcontrol: remove mod_memcg_page_state() Tal Zussman 2026-10-14 18:08 ` Harry Yoo 2026-10-14 18:25 ` Shakeel Butt @ 2026-10-14 20:30 ` Johannes Weiner 2 siblings, 0 replies; 9+ messages in thread From: Johannes Weiner @ 2026-10-14 20:30 UTC (permalink / raw) To: Tal Zussman Cc: Michal Hocko, Roman Gushchin, Shakeel Butt, Muchun Song, cgroups, linux-mm, linux-kernel On Wed, Oct 14, 2026 at 01:08:20PM -0400, Tal Zussman wrote: > The last caller was removed in commit c466412c73c3 ("mm: memcontrol: > switch to native NR_VMALLOC vmstat counter"). Remove it. > > Signed-off-by: Tal Zussman <tz2294@columbia.edu> Reviewed-by: Johannes Weiner <hannes@cmpxchg.org> Thanks Tal ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/2] mm: memcontrol: remove page_memcg_check() 2026-10-14 17:08 [PATCH 0/2] mm: memcontrol: remove two unused helpers Tal Zussman 2026-10-14 17:08 ` [PATCH 1/2] mm: memcontrol: remove mod_memcg_page_state() Tal Zussman @ 2026-10-14 17:08 ` Tal Zussman 2026-10-14 18:08 ` Harry Yoo ` (2 more replies) 1 sibling, 3 replies; 9+ messages in thread From: Tal Zussman @ 2026-10-14 17:08 UTC (permalink / raw) To: Johannes Weiner, Michal Hocko, Roman Gushchin, Shakeel Butt, Muchun Song Cc: cgroups, linux-mm, linux-kernel, Tal Zussman The last caller was removed in commit 90f095b816e2 ("mm/page_owner: use memcg_data snapshot to avoid TOCTOU in print_page_owner_memcg()"). Remove it. Signed-off-by: Tal Zussman <tz2294@columbia.edu> --- include/linux/memcontrol.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index b65a2d0fca3a..33439e285d94 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -499,13 +499,6 @@ static inline struct mem_cgroup *folio_memcg_check(const struct folio *folio) return obj_cgroup_memcg(objcg); } -static inline struct mem_cgroup *page_memcg_check(const struct page *page) -{ - if (PageTail(page)) - return NULL; - return folio_memcg_check((const struct folio *)page); -} - static inline struct mem_cgroup *get_mem_cgroup_from_objcg(const struct obj_cgroup *objcg) { struct mem_cgroup *memcg; @@ -1089,11 +1082,6 @@ static inline struct mem_cgroup *folio_memcg_check(const struct folio *folio) return NULL; } -static inline struct mem_cgroup *page_memcg_check(const struct page *page) -{ - return NULL; -} - static inline struct mem_cgroup *get_mem_cgroup_from_objcg(const struct obj_cgroup *objcg) { return NULL; -- 2.39.5 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] mm: memcontrol: remove page_memcg_check() 2026-10-14 17:08 ` [PATCH 2/2] mm: memcontrol: remove page_memcg_check() Tal Zussman @ 2026-10-14 18:08 ` Harry Yoo 2026-10-14 18:25 ` Shakeel Butt 2026-10-14 20:30 ` Johannes Weiner 2 siblings, 0 replies; 9+ messages in thread From: Harry Yoo @ 2026-10-14 18:08 UTC (permalink / raw) To: Tal Zussman Cc: Johannes Weiner, Michal Hocko, Roman Gushchin, Shakeel Butt, Muchun Song, cgroups, linux-mm, linux-kernel On Wed, Oct 14, 2026 at 01:08:21PM -0400, Tal Zussman wrote: > The last caller was removed in commit 90f095b816e2 ("mm/page_owner: use > memcg_data snapshot to avoid TOCTOU in print_page_owner_memcg()"). > Remove it. > > Signed-off-by: Tal Zussman <tz2294@columbia.edu> > --- Looks good to me, Reviewed-by: Harry Yoo (Meta) <harry@kernel.org> -- Cheers, Harry / Hyeonggon ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] mm: memcontrol: remove page_memcg_check() 2026-10-14 17:08 ` [PATCH 2/2] mm: memcontrol: remove page_memcg_check() Tal Zussman 2026-10-14 18:08 ` Harry Yoo @ 2026-10-14 18:25 ` Shakeel Butt 2026-10-14 20:30 ` Johannes Weiner 2 siblings, 0 replies; 9+ messages in thread From: Shakeel Butt @ 2026-10-14 18:25 UTC (permalink / raw) To: Tal Zussman Cc: Johannes Weiner, Michal Hocko, Roman Gushchin, Muchun Song, cgroups, linux-mm, linux-kernel On Wed, Oct 14, 2026 at 01:08:21PM -0400, Tal Zussman wrote: > The last caller was removed in commit 90f095b816e2 ("mm/page_owner: use > memcg_data snapshot to avoid TOCTOU in print_page_owner_memcg()"). > Remove it. > > Signed-off-by: Tal Zussman <tz2294@columbia.edu> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] mm: memcontrol: remove page_memcg_check() 2026-10-14 17:08 ` [PATCH 2/2] mm: memcontrol: remove page_memcg_check() Tal Zussman 2026-10-14 18:08 ` Harry Yoo 2026-10-14 18:25 ` Shakeel Butt @ 2026-10-14 20:30 ` Johannes Weiner 2 siblings, 0 replies; 9+ messages in thread From: Johannes Weiner @ 2026-10-14 20:30 UTC (permalink / raw) To: Tal Zussman Cc: Michal Hocko, Roman Gushchin, Shakeel Butt, Muchun Song, cgroups, linux-mm, linux-kernel On Wed, Oct 14, 2026 at 01:08:21PM -0400, Tal Zussman wrote: > The last caller was removed in commit 90f095b816e2 ("mm/page_owner: use > memcg_data snapshot to avoid TOCTOU in print_page_owner_memcg()"). > Remove it. > > Signed-off-by: Tal Zussman <tz2294@columbia.edu> Reviewed-by: Johannes Weiner <hannes@cmpxchg.org> ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-10-14 20:30 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-10-14 17:08 [PATCH 0/2] mm: memcontrol: remove two unused helpers Tal Zussman 2026-10-14 17:08 ` [PATCH 1/2] mm: memcontrol: remove mod_memcg_page_state() Tal Zussman 2026-10-14 18:08 ` Harry Yoo 2026-10-14 18:25 ` Shakeel Butt 2026-10-14 20:30 ` Johannes Weiner 2026-10-14 17:08 ` [PATCH 2/2] mm: memcontrol: remove page_memcg_check() Tal Zussman 2026-10-14 18:08 ` Harry Yoo 2026-10-14 18:25 ` Shakeel Butt 2026-10-14 20:30 ` Johannes Weiner
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.