]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
mm: memcontrol: move stray ratelimit bits to v1
authorJohannes Weiner <hannes@cmpxchg.org>
Fri, 24 Jan 2025 04:38:59 +0000 (23:38 -0500)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 17 Mar 2025 05:05:55 +0000 (22:05 -0700)
41213dd0f816 ("memcg: move mem_cgroup_event_ratelimit to v1 code") left
this one behind.  There are no v2 references.

Link: https://lkml.kernel.org/r/20250124043859.18808-2-hannes@cmpxchg.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Muchun Song <songmuchun@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memcontrol-v1.c
mm/memcontrol-v1.h

index 2be6b9112808cb39d2bd3397669f59cdb8cc358f..6d184fae0ad1f47e5dffcc1267f4e5fa5184900e 100644 (file)
@@ -490,6 +490,19 @@ static void mem_cgroup_threshold(struct mem_cgroup *memcg)
 }
 
 /* Cgroup1: threshold notifications & softlimit tree updates */
+
+/*
+ * Per memcg event counter is incremented at every pagein/pageout. With THP,
+ * it will be incremented by the number of pages. This counter is used
+ * to trigger some periodic events. This is straightforward and better
+ * than using jiffies etc. to handle periodic memcg event.
+ */
+enum mem_cgroup_events_target {
+       MEM_CGROUP_TARGET_THRESH,
+       MEM_CGROUP_TARGET_SOFTLIMIT,
+       MEM_CGROUP_NTARGETS,
+};
+
 struct memcg1_events_percpu {
        unsigned long nr_page_events;
        unsigned long targets[MEM_CGROUP_NTARGETS];
index ffd2ac839185155768baa2767bd5fc5f617e4464..bfe44d2337a5e002feef11402e3e8b60bd56865f 100644 (file)
@@ -28,18 +28,6 @@ static inline bool do_memsw_account(void)
        return !cgroup_subsys_on_dfl(memory_cgrp_subsys);
 }
 
-/*
- * Per memcg event counter is incremented at every pagein/pageout. With THP,
- * it will be incremented by the number of pages. This counter is used
- * to trigger some periodic events. This is straightforward and better
- * than using jiffies etc. to handle periodic memcg event.
- */
-enum mem_cgroup_events_target {
-       MEM_CGROUP_TARGET_THRESH,
-       MEM_CGROUP_TARGET_SOFTLIMIT,
-       MEM_CGROUP_NTARGETS,
-};
-
 unsigned long mem_cgroup_usage(struct mem_cgroup *memcg, bool swap);
 
 void drain_all_stock(struct mem_cgroup *root_memcg);