From: "Michal Koutný" <mkoutny@suse.com>
To: Waiman Long <longman@redhat.com>
Cc: Tejun Heo <tj@kernel.org>, Zefan Li <lizefan.x@bytedance.com>,
Johannes Weiner <hannes@cmpxchg.org>,
cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: [PATCH 2/2] cgroup/cpuset: Optimize cpuset_attach() on v2
Date: Mon, 21 Nov 2022 19:50:42 +0100 [thread overview]
Message-ID: <20221121185042.GA15225@blackbody.suse.cz> (raw)
In-Reply-To: <20221112221939.1272764-3-longman@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 609 bytes --]
On Sat, Nov 12, 2022 at 05:19:39PM -0500, Waiman Long <longman@redhat.com> wrote:
> + /*
> + * In the default hierarchy, enabling cpuset in the child cgroups
> + * will trigger a number of cpuset_attach() calls with no change
> + * in effective cpus and mems. In that case, we can optimize out
> + * by skipping the task iteration and update.
> + */
> + if (cgroup_subsys_on_dfl(cpuset_cgrp_subsys) &&
> + !cpus_updated && !mems_updated) {
I'm just wondering -- why is this limited to the default hierarchy only?
IOW why can't v1 skip too (when favorable constness between cpusets).
Thanks,
Michal
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2022-11-21 18:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-12 22:19 [PATCH 0/2] cgroup/cpuset: v2 optimization Waiman Long
2022-11-12 22:19 ` [PATCH 1/2] cgroup/cpuset: Skip spread flags update on v2 Waiman Long
2022-11-12 22:19 ` [PATCH 2/2] cgroup/cpuset: Optimize cpuset_attach() " Waiman Long
2022-11-21 18:50 ` Michal Koutný [this message]
2022-11-21 19:11 ` Waiman Long
2022-11-23 15:19 ` Sebastian Andrzej Siewior
2022-11-14 21:46 ` [PATCH 0/2] cgroup/cpuset: v2 optimization Tejun Heo
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=20221121185042.GA15225@blackbody.suse.cz \
--to=mkoutny@suse.com \
--cc=bigeasy@linutronix.de \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan.x@bytedance.com \
--cc=longman@redhat.com \
--cc=tj@kernel.org \
/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