All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hillf Danton <hdanton@sina.com>
To: Tejun Heo <tj@kernel.org>
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: Sat,  5 Jun 2021 15:43:30 +0800	[thread overview]
Message-ID: <20210605074331.6952-1-hdanton@sina.com> (raw)
In-Reply-To: <YLriZxiWo+2hMI7g@slm.duckdns.org>

On Fri, 4 Jun 2021 22:33:11 -0400 Tejun Heo wrote:
>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 for the light on the per-cpu workqueue - it is difficult to understand
that short stuff without it.

Hillf


      parent reply	other threads:[~2021-06-05  7:44 UTC|newest]

Thread overview: 13+ 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 ` Shakeel Butt
2021-06-04  1:56 ` [PATCH 2/2] memcg: periodically flush the memcg stats Shakeel Butt
2021-06-04  1:56   ` Shakeel Butt
2021-06-04  1:56   ` Shakeel Butt
2021-06-04  6:18   ` Hillf Danton
2021-06-04 12:45     ` Tejun Heo
2021-06-04 12:45       ` Tejun Heo
     [not found]     ` <20210605015421.5096-1-hdanton@sina.com>
2021-06-05  2:33       ` Tejun Heo
2021-06-05  2:33         ` Tejun Heo
2021-06-05  4:45         ` Shakeel Butt
2021-06-05  4:45           ` Shakeel Butt
2021-06-05  7:43         ` Hillf Danton [this message]

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=20210605074331.6952-1-hdanton@sina.com \
    --to=hdanton@sina.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=guro@fb.com \
    --cc=hannes@cmpxchg.org \
    --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=tj@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.