lkml.org 
[lkml]   [2023]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 2/3] mm: memcg: add a helper for non-unified stats flushing
On Mon, Aug 21, 2023 at 08:54:57PM +0000, Yosry Ahmed <yosryahmed@google.com> wrote:
> +static void do_stats_flush(struct mem_cgroup *memcg)
> +{
> + cgroup_rstat_flush(memcg->css.cgroup);
if(memcg == root_mem_cgroup)
atomic_set(&stats_flush_threshold, 0);
> +}
> +
> /*
> * do_unified_stats_flush - do a unified flush of memory cgroup statistics
> *
> @@ -656,7 +667,7 @@ static void do_unified_stats_flush(void)
>
> WRITE_ONCE(flush_next_time, jiffies_64 + 2*FLUSH_TIME);
>
> - cgroup_rstat_flush(root_mem_cgroup->css.cgroup);
> + do_stats_flush(root_mem_cgroup);
>
- atomic_set(&stats_flush_threshold, 0);
> atomic_set(&stats_flush_ongoing, 0);

You may reset stats_flush_threshold to save the unified flushers some
work.

Michal

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-08-22 15:01    [W:0.250 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site