Re: [PATCH 2/2] memcg: periodically flush the memcg stats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux