Commit 92fbbc72 authored by Yosry Ahmed's avatar Yosry Ahmed Committed by Andrew Morton

memcg: rename mem_cgroup_flush_stats_"delayed" to "ratelimited"

mem_cgroup_flush_stats_delayed() suggests his is using a delayed_work, but
this is actually sometimes flushing directly from the callsite.

What it's doing is ratelimited calls.  A better name would be
mem_cgroup_flush_stats_ratelimited().

Link: https://lkml.kernel.org/r/20230330191801.1967435-3-yosryahmed@google.comSigned-off-by: default avatarYosry Ahmed <yosryahmed@google.com>
Suggested-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
Acked-by: default avatarShakeel Butt <shakeelb@google.com>
Acked-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
Acked-by: default avatarMichal Hocko <mhocko@suse.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Josef Bacik <josef@toxicpanda.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Michal Koutný <mkoutny@suse.com>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Tejun Heo <tj@kernel.org>
Cc: Vasily Averin <vasily.averin@linux.dev>
Cc: Zefan Li <lizefan.x@bytedance.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 8bff9a04
...@@ -1038,7 +1038,7 @@ static inline unsigned long lruvec_page_state_local(struct lruvec *lruvec, ...@@ -1038,7 +1038,7 @@ static inline unsigned long lruvec_page_state_local(struct lruvec *lruvec,
} }
void mem_cgroup_flush_stats(void); void mem_cgroup_flush_stats(void);
void mem_cgroup_flush_stats_delayed(void); void mem_cgroup_flush_stats_ratelimited(void);
void __mod_memcg_lruvec_state(struct lruvec *lruvec, enum node_stat_item idx, void __mod_memcg_lruvec_state(struct lruvec *lruvec, enum node_stat_item idx,
int val); int val);
...@@ -1536,7 +1536,7 @@ static inline void mem_cgroup_flush_stats(void) ...@@ -1536,7 +1536,7 @@ static inline void mem_cgroup_flush_stats(void)
{ {
} }
static inline void mem_cgroup_flush_stats_delayed(void) static inline void mem_cgroup_flush_stats_ratelimited(void)
{ {
} }
......
...@@ -654,7 +654,7 @@ void mem_cgroup_flush_stats(void) ...@@ -654,7 +654,7 @@ void mem_cgroup_flush_stats(void)
__mem_cgroup_flush_stats(); __mem_cgroup_flush_stats();
} }
void mem_cgroup_flush_stats_delayed(void) void mem_cgroup_flush_stats_ratelimited(void)
{ {
if (time_after64(jiffies_64, flush_next_time)) if (time_after64(jiffies_64, flush_next_time))
mem_cgroup_flush_stats(); mem_cgroup_flush_stats();
......
...@@ -462,7 +462,7 @@ void workingset_refault(struct folio *folio, void *shadow) ...@@ -462,7 +462,7 @@ void workingset_refault(struct folio *folio, void *shadow)
mod_lruvec_state(lruvec, WORKINGSET_REFAULT_BASE + file, nr); mod_lruvec_state(lruvec, WORKINGSET_REFAULT_BASE + file, nr);
mem_cgroup_flush_stats_delayed(); mem_cgroup_flush_stats_ratelimited();
/* /*
* Compare the distance to the existing workingset size. We * Compare the distance to the existing workingset size. We
* don't activate pages that couldn't stay resident even if * don't activate pages that couldn't stay resident even if
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment