linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
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 22:33:11 -0400	[thread overview]
Message-ID: <YLriZxiWo+2hMI7g@slm.duckdns.org> (raw)
In-Reply-To: <20210605015421.5096-1-hdanton@sina.com>

On Sat, Jun 05, 2021 at 09:54:21AM +0800, Hillf Danton wrote:
> The cond_resched() in cgroup_rstat_flush_locked() matches its appearence in
> your post [1]. So does unbound IMHO.

Ah yeah, this either needs CPU_INTENSIVE or UNBOUND, prolly the latter is
better.

> And the short stuff [2] looks to me like it is incorrect to queue a work
> acquiring mutex lock on to the system_wq. IOW the unbound wq is the right
> thing for any work that might sleep.

This part doesn't make sense. Blocking from per-cpu workqueue is completely
fine. What's not fine is consuming a lot of CPU cycles.

Thanks.

-- 
tejun


  parent reply	other threads:[~2021-06-05  5:29 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
     [not found]     ` <20210605015421.5096-1-hdanton@sina.com>
2021-06-05  2:33       ` Tejun Heo [this message]
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=YLriZxiWo+2hMI7g@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).