From: Waiman Long <longman@redhat.com>
To: Barry Song <21cnbao@gmail.com>
Cc: amit.pundir@linaro.org, cgroups@vger.kernel.org,
dimitrysh@google.com, groeck@chromium.org, hannes@cmpxchg.org,
joel@joelfernandes.org, jsbarnes@google.com,
kernel-team@android.com, kerrnel@google.com,
linux-kernel@vger.kernel.org, lizefan@huawei.com,
peterz@infradead.org, sonnyrao@google.com, tj@kernel.org,
vpillai@digitalocean.com
Subject: Re: [PATCH RFC] cpuset: Make cpusets get restored on hotplug
Date: Tue, 26 Oct 2021 21:06:47 -0400 [thread overview]
Message-ID: <f795f8be-a184-408a-0b5a-553d26061385@redhat.com> (raw)
In-Reply-To: <20211026235808.34168-1-21cnbao@gmail.com>
On 10/26/21 7:58 PM, Barry Song wrote:
>> I think Tejun is concerned about a change in the default behavior of
>> cpuset v1.
>>
>> There is a special v2 mode for cpuset that is enabled by the mount
>> option "cpuset_v2_mode". This causes the cpuset v1 to adopt some of the
>> v2 behavior. I introduced this v2 mode a while back to address, I think,
>> a similar concern. Could you try that to see if it is able to address
>> your problem? If not, you can make some code adjustment within the
>> framework of the v2 mode. As long as it is an opt-in, I think we are
>> open to further change.
> I am also able to reproduce on Ubuntu 21.04 LTS.
>
> all docker will be put in this cgroups and its child cgroups:
> /sys/fs/cgroup/cpuset/docker
>
> disabling and enabling SMT by:
> echo off > /sys/devices/system/cpu/smt/control
> echo on > /sys/devices/system/cpu/smt/control
>
> or unpluging and pluging CPUs by:
> echo 0 > /sys/devices/system/cpu/cpuX/online
> echo 1 > /sys/devices/system/cpu/cpuX/online
>
> then all docker images will lose some CPUs.
>
> So should we document the broken behaviours somewhere?
Is the special cpuset_v2_mode mount option able to fix the issue?
This mode is documented in
Documentation/admin-guide/cgroup-v1/cpuset.rst:
The cpuset.effective_cpus and cpuset.effective_mems files are
normally read-only copies of cpuset.cpus and cpuset.mems files
respectively. If the cpuset cgroup filesystem is mounted with the
special "cpuset_v2_mode" option, the behavior of these files will become
similar to the corresponding files in cpuset v2. In other words, hotplug
events will not change cpuset.cpus and cpuset.mems. Those events will
only affect cpuset.effective_cpus and cpuset.effective_mems which show
the actual cpus and memory nodes that are currently used by this cpuset.
See Documentation/admin-guide/cgroup-v2.rst for more information about
cpuset v2 behavior.
Maybe we can make it more visible.
Cheers,
Longman
next prev parent reply other threads:[~2021-10-27 1:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-26 19:16 Joel Fernandes (Google)
2020-03-26 19:20 ` Tejun Heo
2020-03-26 19:44 ` Joel Fernandes
2020-03-26 19:48 ` Tejun Heo
2020-03-26 19:57 ` Waiman Long
2020-03-26 20:05 ` Sonny Rao
2020-03-26 20:18 ` Tejun Heo
2020-03-26 20:23 ` Joel Fernandes
2020-03-27 1:26 ` Waiman Long
2020-03-27 3:32 ` Joel Fernandes
2020-03-26 21:47 ` Waiman Long
2020-03-26 22:03 ` Sonny Rao
2021-10-26 23:58 ` Barry Song
2021-10-27 1:06 ` Waiman Long [this message]
2021-10-27 2:21 ` Barry Song
2021-10-27 2:35 ` Waiman Long
2021-10-27 2:42 ` Barry Song
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=f795f8be-a184-408a-0b5a-553d26061385@redhat.com \
--to=longman@redhat.com \
--cc=21cnbao@gmail.com \
--cc=amit.pundir@linaro.org \
--cc=cgroups@vger.kernel.org \
--cc=dimitrysh@google.com \
--cc=groeck@chromium.org \
--cc=hannes@cmpxchg.org \
--cc=joel@joelfernandes.org \
--cc=jsbarnes@google.com \
--cc=kernel-team@android.com \
--cc=kerrnel@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=peterz@infradead.org \
--cc=sonnyrao@google.com \
--cc=tj@kernel.org \
--cc=vpillai@digitalocean.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 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®