lkml.org 
[lkml]   [2021]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] memcg: periodically flush the memcg stats
On Fri, Jun 04, 2021 at 02:18:16PM +0800, Hillf Danton wrote:
> On Thu, 3 Jun 2021 18:56:40 -0700 Shakeel Butt wrote:
> >
> > +static void flush_memcg_stats(struct work_struct *w)
> > +{
> > + cgroup_rstat_flush(root_mem_cgroup->css.cgroup);
> > + schedule_delayed_work(&stats_flush, round_jiffies(2UL*HZ));
> > +}
>
> Given flush may block, the unbound wq is what you need.
>
> queue_delayed_work(system_unbound_wq, &stats_flush, 2 * HZ);

Default per-cpu workqueue can block just fine. I don't see a strong reason
why this would need to be unbound.

--
tejun

\
 
 \ /
  Last update: 2021-06-04 14:46    [W:0.058 / U:1.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site