From: Waiman Long <longman@redhat.com>
To: "Michal Koutný" <mkoutny@suse.com>
Cc: Tejun Heo <tj@kernel.org>, Zefan Li <lizefan.x@bytedance.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Christian Brauner <brauner@kernel.org>,
Jonathan Corbet <corbet@lwn.net>, Shuah Khan <shuah@kernel.org>,
cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
Juri Lelli <juri.lelli@redhat.com>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Giuseppe Scrivano <gscrivan@redhat.com>
Subject: Re: [PATCH v8 0/7] cgroup/cpuset: Support remote partitions
Date: Wed, 1 Nov 2023 14:14:38 -0400 [thread overview]
Message-ID: <7dc9cf67-b482-a723-c779-14c7598e1869@redhat.com> (raw)
In-Reply-To: <agjgbmdi2yqegjk7p7m52yb3wxmr64ivohbra5wapcd3lwynpw@jjmx6dsboo53>
On 10/24/23 12:13, Michal Koutný wrote:
> On Fri, Oct 13, 2023 at 12:03:18PM -0400, Waiman Long <longman@redhat.com> wrote:
>>> [chain]
>>> root
>>> | \
>>> mid1a mid1b
>>> cpuset.cpus=0-1 cpuset.cpus=2-15
>>> cpuset.cpus.partition=root
>>> |
>>> mid2
>>> cpuset.cpus=0-1
>>> cpuset.cpus.partition=root
>>> |
>>> cont
>>> cpuset.cpus=0-1
>>> cpuset.cpus.partition=root
>> In this case, the effective CPUs of both mid1a and mid2 will be empty. IOW,
>> you can't have any task in these 2 cpusets.
> I see, that is relevant to a threaded subtree only where the admin / app
> can know how to distribute CPUs and place threads to internal nodes.
>
>> For the remote case, you can have intermediate tasks in both mid1a and mid2
>> as long as cpuset.cpus contains more CPUs than cpuset.cpus.exclusive.
> It's obvious that cpuset.cpus.exclusive should be exclusive among
> siblings.
> Should it also be so along the vertical path?
Sorry for the late reply. I have forgot to respond earlier.
We don't support that vertical exclusive check in cgroup v1
cpuset.cpu_exclusive.
> root
> |
> mid1a
> cpuset.cpus=0-2
> cpuset.cpus.exclusive=0
> |
> mid2
> cpuset.cpus=0-2
> cpuset.cpus.exclusive=1
> |
> cont
> cpuset.cpus=0-2
> cpuset.cpus.exclusive=2
> cpuset.cpus.partition=root
>
> IIUC, this should be a valid config regardless of cpuset.cpus.partition
> setting on mid1a and mid2.
> Whereas
>
> root
> |
> mid1a
> cpuset.cpus=0-2
> cpuset.cpus.exclusive=0
> |
> mid2
> cpuset.cpus=0-2
> cpuset.cpus.exclusive=1-2
> cpuset.cpus.partition=root
> |
> cont
> cpuset.cpus=1-2
> cpuset.cpus.exclusive=1-2
> cpuset.cpus.partition=root
>
> Here, I'm hesitating, will mid2 have any exclusively owned cpus?
>
> (I have flashes of understading cpus.exclusive as being a more
> expressive mechanism than partitions. OTOH, it seems non-intuitive when
> both are combined, thus I'm asking to internalize it better.
> Should partitions be deprecated for simplicty? They're still good to
> provide the notification mechanism of invalidation.
> cpuset.cpus.exclusive.effective don't have that.)
Like cpuset.cpus, cpuset.cpus.exclusive follows the same hierarchical
rule. IOW, the CPUs in cpuset.cpus.exclusive will be ignored if they are
not present in its ancestor nodes. The value in cpuset.cpus.exclusive
shows the intent of the users. cpuset.cpus.exclusive.effective shows the
real exclusive CPUs when partition is enabled. So we just can't use
cpuset.cpus.exclusive as a replacement for cpuset.cpus.partition.
As a result, we can't actually support the vertical CPU exclusion as you
suggest above.
>
>> They will be ready eventually. This requirement of remote partition actually
>> came from our OpenShift team as the use of just local partition did not meet
>> their need. They don't need access to exclusive CPUs in the parent cgroup
>> layer for their management daemons. They do need to activate isolated
>> partition in selected child cgroups to support our Telco customers to run
>> workloads like DPDK.
>>
>> So they will add the support to upstream Kubernetes.
> Is it worth implementing anything touching (ancestral)
> cpuset.cpus.partition then?
I don't quite get what you want to ask here.
Cheers,
Longman
prev parent reply other threads:[~2023-11-01 18:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-05 13:32 Waiman Long
2023-09-05 13:32 ` [PATCH v8 1/7] cgroup/cpuset: Fix load balance state in update_partition_sd_lb() Waiman Long
2023-09-05 13:32 ` [PATCH v8 2/7] cgroup/cpuset: Add cpuset.cpus.exclusive.effective for v2 Waiman Long
2023-09-05 13:32 ` [PATCH v8 3/7] cgroup/cpuset: Add cpuset.cpus.exclusive " Waiman Long
2023-09-05 13:32 ` [PATCH v8 4/7] cgroup/cpuset: Introduce remote partition Waiman Long
2023-09-05 13:32 ` [PATCH v8 5/7] cgroup/cpuset: Check partition conflict with housekeeping setup Waiman Long
2023-09-05 13:32 ` [PATCH v8 6/7] cgroup/cpuset: Documentation update for partition Waiman Long
2023-09-05 13:32 ` [PATCH v8 7/7] cgroup/cpuset: Extend test_cpuset_prs.sh to test remote partition Waiman Long
2023-09-18 20:33 ` [PATCH v8 0/7] cgroup/cpuset: Support remote partitions Tejun Heo
2023-10-13 15:50 ` Michal Koutný
2023-10-13 16:03 ` Waiman Long
2023-10-24 16:13 ` Michal Koutný
2023-11-01 18:14 ` Waiman Long [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=7dc9cf67-b482-a723-c779-14c7598e1869@redhat.com \
--to=longman@redhat.com \
--cc=brauner@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=dietmar.eggemann@arm.com \
--cc=gscrivan@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan.x@bytedance.com \
--cc=mkoutny@suse.com \
--cc=shuah@kernel.org \
--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
all inboxes | Powered by JetHome®