LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Waiman Long <email@example.com>
To: Tejun Heo <firstname.lastname@example.org>, Waiman Long <email@example.com>
Cc: "Zefan Li" <firstname.lastname@example.org>,
"Johannes Weiner" <email@example.com>,
"Jonathan Corbet" <firstname.lastname@example.org>,
"Shuah Khan" <email@example.com>,
"Andrew Morton" <firstname.lastname@example.org>,
"Roman Gushchin" <email@example.com>, "Phil Auld" <firstname.lastname@example.org>,
"Peter Zijlstra" <email@example.com>,
"Juri Lelli" <firstname.lastname@example.org>,
"Frederic Weisbecker" <email@example.com>,
"Marcelo Tosatti" <firstname.lastname@example.org>,
"Michal Koutný" <email@example.com>
Subject: Re: [PATCH v7 5/6] cgroup/cpuset: Update description of cpuset.cpus.partition in cgroup-v2.rst
Date: Fri, 27 Aug 2021 21:14:01 -0400 [thread overview]
Message-ID: <firstname.lastname@example.org> (raw)
On 8/27/21 7:35 PM, Tejun Heo wrote:
> On Fri, Aug 27, 2021 at 06:50:10PM -0400, Waiman Long wrote:
>> The cpu exclusivity rule is due to the setting of CPU_EXCLUSIVE bit. This is
>> a pre-existing condition unless you want to change how the
>> cpuset.cpu_exclusive works.
>> So the new rules will be:
>> 1) The "cpuset.cpus" is not empty and the list of CPUs are exclusive.
> Empty cpu list can be considered an exclusive one.
It doesn't make sense to me to have a partition with no cpu configured
at all. I very much prefer the users to set cpuset.cpus first before
turning it into a partition.
>> 2) The parent cgroup is a partition root (can be an invalid one).
> Does this mean a partition parent can't stop being a partition if one or
> more of its children become partitions? If so, it violates the rule that a
> descendant shouldn't be able to restrict what its ancestors can do.
No. As I said in the documentation, transitioning from partition root to
member is allowed. Against, it is illogical to allow a cpuset to become
a potential partition if it parent is not even a partition root at all.
In the case that the parent is reverted back to a member, the child
partitions will stay invalid forever unless the parent become a valid
>> 3) The "cpuset.cpus" is a subset of the parent's cpuset.cpus.allowed.
> Why not just go by effective? This would mean that a parent can't withdraw
> CPUs from its allowed set once descendants are configured. Restrictions like
> this are fine when the entire hierarchy is configured by a single entity but
> become awkward when configurations are multi-tiered, automated and dynamic.
The original rule is to be based on effective cpus. However, to properly
handle the case of allowing offlined cpus to be included in the
partition, I have to change it to cpu_allowed instead. I can certainly
change it back to effective if you prefer.
>> 4) No child cgroup with cpuset enabled.
> idk, maybe? I'm having a hard time seeing the point in adding these
> restrictions when the state transitions are asynchronous anyway. Would it
> help if we try to separate what's absoluately and technically necessary and
> what seems reasonable or high bar and try to justify why each of the latter
> should be added?
This rule is there mainly for ease of implementation. Otherwise, I need
to add additional code to handle the conversion of child cpusets which
can be rather complex and require a lot more debugging. This rule will
no longer apply once the cpuset becomes a partition root.
next prev parent reply other threads:[~2021-08-28 1:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-25 21:37 [PATCH v7 0/6] cgroup/cpuset: Add new cpuset partition type & empty effecitve cpus Waiman Long
2021-08-25 21:37 ` [PATCH v7 1/6] cgroup/cpuset: Properly transition to invalid partition Waiman Long
2021-08-25 21:37 ` [PATCH v7 2/6] cgroup/cpuset: Show invalid partition reason string Waiman Long
2021-08-25 21:37 ` [PATCH v7 3/6] cgroup/cpuset: Add a new isolated cpus.partition type Waiman Long
2021-08-25 21:37 ` [PATCH v7 4/6] cgroup/cpuset: Allow non-top parent partition to distribute out all CPUs Waiman Long
2021-08-25 21:37 ` [PATCH v7 5/6] cgroup/cpuset: Update description of cpuset.cpus.partition in cgroup-v2.rst Waiman Long
2021-08-26 17:35 ` Tejun Heo
2021-08-27 3:01 ` Waiman Long
2021-08-27 4:00 ` Tejun Heo
2021-08-27 21:19 ` Waiman Long
2021-08-27 21:27 ` Tejun Heo
2021-08-27 22:50 ` Waiman Long
2021-08-27 23:35 ` Tejun Heo
2021-08-28 1:14 ` Waiman Long [this message]
[not found] ` <email@example.com>
2021-10-12 14:39 ` Michal Koutný
2021-10-13 21:45 ` Waiman Long
2021-10-13 22:11 ` Waiman Long
2021-08-30 17:59 ` Michal Koutný
2021-08-25 21:37 ` [PATCH v7 6/6] kselftest/cgroup: Add cpuset v2 partition root state test Waiman Long
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:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--subject='Re: [PATCH v7 5/6] cgroup/cpuset: Update description of cpuset.cpus.partition in cgroup-v2.rst' \
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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).