public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] mm/memcontrol.c: make cgroup_memory_noswap static
@ 2022-04-21 12:47 Lu Jialin
       [not found] ` <20220421124736.62180-1-lujialin4-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Lu Jialin @ 2022-04-21 12:47 UTC (permalink / raw)
  To: Johannes Weiner, Andrew Morton, Michal Hocko, Roman Gushchin,
	Shakeel Butt, Muchun Song, Matthew Wilcox, Yang Shi,
	Suren Baghdasaryan, Vlastimil Babka
  Cc: Lu Jialin, Wang Weiyang, cgroups-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg

cgroup_memory_noswap is only used in mm/memcontrol.c, therefore just make
it static, and remove export in include/linux/memcontrol.h

Signed-off-by: Lu Jialin <lujialin4-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
---
 include/linux/memcontrol.h | 4 ----
 mm/memcontrol.c            | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index a68dce3873fc..2406cc5153d4 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -937,10 +937,6 @@ struct mem_cgroup *mem_cgroup_get_oom_group(struct task_struct *victim,
 					    struct mem_cgroup *oom_domain);
 void mem_cgroup_print_oom_group(struct mem_cgroup *memcg);
 
-#ifdef CONFIG_MEMCG_SWAP
-extern bool cgroup_memory_noswap;
-#endif
-
 void folio_memcg_lock(struct folio *folio);
 void folio_memcg_unlock(struct folio *folio);
 void lock_page_memcg(struct page *page);
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 725f76723220..2fc363ee258c 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -89,7 +89,7 @@ static bool cgroup_memory_nokmem __ro_after_init;
 
 /* Whether the swap controller is active */
 #ifdef CONFIG_MEMCG_SWAP
-bool cgroup_memory_noswap __ro_after_init;
+static bool cgroup_memory_noswap __ro_after_init;
 #else
 #define cgroup_memory_noswap		1
 #endif
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH -next] mm/memcontrol.c: make cgroup_memory_noswap static
       [not found] ` <20220421124736.62180-1-lujialin4-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
@ 2022-04-21 14:22   ` Johannes Weiner
  2022-04-21 15:25   ` Shakeel Butt
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Johannes Weiner @ 2022-04-21 14:22 UTC (permalink / raw)
  To: Lu Jialin
  Cc: Andrew Morton, Michal Hocko, Roman Gushchin, Shakeel Butt,
	Muchun Song, Matthew Wilcox, Yang Shi, Suren Baghdasaryan,
	Vlastimil Babka, Wang Weiyang, cgroups-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg

On Thu, Apr 21, 2022 at 08:47:36PM +0800, Lu Jialin wrote:
> cgroup_memory_noswap is only used in mm/memcontrol.c, therefore just make
> it static, and remove export in include/linux/memcontrol.h
> 
> Signed-off-by: Lu Jialin <lujialin4-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>

Nice. Unused since 2d1c498072de ("mm: memcontrol: make swap tracking
an integral part of memory control"), which removed the two instances
from mm/swap_cgroup.c.

Acked-by: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH -next] mm/memcontrol.c: make cgroup_memory_noswap static
       [not found] ` <20220421124736.62180-1-lujialin4-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
  2022-04-21 14:22   ` Johannes Weiner
@ 2022-04-21 15:25   ` Shakeel Butt
  2022-04-21 18:23   ` Roman Gushchin
  2022-04-22  2:23   ` Muchun Song
  3 siblings, 0 replies; 5+ messages in thread
From: Shakeel Butt @ 2022-04-21 15:25 UTC (permalink / raw)
  To: Lu Jialin
  Cc: Johannes Weiner, Andrew Morton, Michal Hocko, Roman Gushchin,
	Muchun Song, Matthew Wilcox, Yang Shi, Suren Baghdasaryan,
	Vlastimil Babka, Wang Weiyang, Cgroups, LKML, Linux MM

On Thu, Apr 21, 2022 at 5:48 AM Lu Jialin <lujialin4-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> wrote:
>
> cgroup_memory_noswap is only used in mm/memcontrol.c, therefore just make
> it static, and remove export in include/linux/memcontrol.h
>
> Signed-off-by: Lu Jialin <lujialin4-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>

Acked-by: Shakeel Butt <shakeelb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH -next] mm/memcontrol.c: make cgroup_memory_noswap static
       [not found] ` <20220421124736.62180-1-lujialin4-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
  2022-04-21 14:22   ` Johannes Weiner
  2022-04-21 15:25   ` Shakeel Butt
@ 2022-04-21 18:23   ` Roman Gushchin
  2022-04-22  2:23   ` Muchun Song
  3 siblings, 0 replies; 5+ messages in thread
From: Roman Gushchin @ 2022-04-21 18:23 UTC (permalink / raw)
  To: Lu Jialin
  Cc: Johannes Weiner, Andrew Morton, Michal Hocko, Shakeel Butt,
	Muchun Song, Matthew Wilcox, Yang Shi, Suren Baghdasaryan,
	Vlastimil Babka, Wang Weiyang, cgroups-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg

On Thu, Apr 21, 2022 at 08:47:36PM +0800, Lu Jialin wrote:
> cgroup_memory_noswap is only used in mm/memcontrol.c, therefore just make
> it static, and remove export in include/linux/memcontrol.h
> 
> Signed-off-by: Lu Jialin <lujialin4-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>

Acked-by: Roman Gushchin <roman.gushchin-fxUVXftIFDnyG1zEObXtfA@public.gmane.org>

Thanks!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH -next] mm/memcontrol.c: make cgroup_memory_noswap static
       [not found] ` <20220421124736.62180-1-lujialin4-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
                     ` (2 preceding siblings ...)
  2022-04-21 18:23   ` Roman Gushchin
@ 2022-04-22  2:23   ` Muchun Song
  3 siblings, 0 replies; 5+ messages in thread
From: Muchun Song @ 2022-04-22  2:23 UTC (permalink / raw)
  To: Lu Jialin
  Cc: Johannes Weiner, Andrew Morton, Michal Hocko, Roman Gushchin,
	Shakeel Butt, Matthew Wilcox, Yang Shi, Suren Baghdasaryan,
	Vlastimil Babka, Wang Weiyang, cgroups-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg

On Thu, Apr 21, 2022 at 08:47:36PM +0800, Lu Jialin wrote:
> cgroup_memory_noswap is only used in mm/memcontrol.c, therefore just make
> it static, and remove export in include/linux/memcontrol.h
> 
> Signed-off-by: Lu Jialin <lujialin4-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>

Reviewed-by: Muchun Song <songmuchun-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>

Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-04-22  2:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-21 12:47 [PATCH -next] mm/memcontrol.c: make cgroup_memory_noswap static Lu Jialin
     [not found] ` <20220421124736.62180-1-lujialin4-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2022-04-21 14:22   ` Johannes Weiner
2022-04-21 15:25   ` Shakeel Butt
2022-04-21 18:23   ` Roman Gushchin
2022-04-22  2:23   ` Muchun Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox