From: Tejun Heo <tj@kernel.org>
To: Hillf Danton <hdanton@sina.com>
Cc: "Shakeel Butt" <shakeelb@google.com>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Muchun Song" <songmuchun@bytedance.com>,
"Michal Hocko" <mhocko@kernel.org>,
"Roman Gushchin" <guro@fb.com>,
"Michal Koutný" <mkoutny@suse.com>,
"Huang Ying" <ying.huang@intel.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
cgroups@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] memcg: periodically flush the memcg stats
Date: Fri, 4 Jun 2021 08:45:19 -0400 [thread overview]
Message-ID: <YLogX+4YSMacgbGH@slm.duckdns.org> (raw)
In-Reply-To: <20210604061816.3110-1-hdanton@sina.com>
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
next prev parent reply other threads:[~2021-06-04 12:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-04 1:56 [PATCH 1/2] memcg: switch lruvec stats to rstat Shakeel Butt
2021-06-04 1:56 ` [PATCH 2/2] memcg: periodically flush the memcg stats Shakeel Butt
2021-06-04 6:18 ` Hillf Danton
2021-06-04 12:45 ` Tejun Heo [this message]
[not found] ` <20210605015421.5096-1-hdanton@sina.com>
2021-06-05 2:33 ` Tejun Heo
2021-06-05 4:45 ` Shakeel Butt
2021-06-05 7:43 ` Hillf Danton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YLogX+4YSMacgbGH@slm.duckdns.org \
--to=tj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mkoutny@suse.com \
--cc=shakeelb@google.com \
--cc=songmuchun@bytedance.com \
--cc=ying.huang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).