Message ID | 20230330191801.1967435-9-yosryahmed@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | memcg: avoid flushing stats atomically where possible | expand |
On Thu, Mar 30, 2023 at 07:18:01PM +0000, Yosry Ahmed <yosryahmed@google.com> wrote: > mm/memcontrol.c | 3 +++ > 1 file changed, 3 insertions(+) Reviewed-by: Michal Koutný <mkoutny@suse.com>
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 361c0bbf7283..a63ee2efa780 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -618,6 +618,9 @@ static inline void memcg_rstat_updated(struct mem_cgroup *memcg, int val) { unsigned int x; + if (!val) + return; + cgroup_rstat_updated(memcg->css.cgroup, smp_processor_id()); x = __this_cpu_add_return(stats_updates, abs(val));