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
WARNING: multiple messages have this Message-ID (diff)
From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> To: Hillf Danton <hdanton-k+cT0dCbe1g@public.gmane.org> Cc: "Shakeel Butt" <shakeelb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>, "Johannes Weiner" <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>, "Muchun Song" <songmuchun-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>, "Michal Hocko" <mhocko-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>, "Roman Gushchin" <guro-b10kYP2dOMg@public.gmane.org>, "Michal Koutný" <mkoutny-IBi9RG/b67k@public.gmane.org>, "Huang Ying" <ying.huang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>, "Andrew Morton" <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.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-k+cT0dCbe1g@public.gmane.org> 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
next prev parent reply other threads:[~2021-06-05 2:34 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 [this message] 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
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: linkBe 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.