The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Chuyi Zhou" <zhouchuyi@bytedance.com>
To: <longman@redhat.com>, <tj@kernel.org>, <hannes@cmpxchg.org>,
	 <mkoutny@suse.com>, <ridong.chen@linux.dev>
Cc: <linux-kernel@vger.kernel.org>, "Chuyi Zhou" <zhouchuyi@bytedance.com>
Subject: [PATCH 0/2] cgroup/cpuset: Limit v2 sibling checks to nonempty exclusive masks
Date: Wed,  2 Dec 2026 18:44:19 +0800	[thread overview]
Message-ID: <cover.1796202058.git.zhouchuyi@bytedance.com> (raw)

This series follows up on "cgroup/cpuset: Skip sibling checks for v2
members without exclusive CPUs" [1]. On v2, validate_change() skips the
sibling walk only for members whose cpuset.cpus.exclusive stays empty.

Ridong pointed out that the walk can be skipped whenever the proposed
exclusive CPU mask is empty [2]. An empty mask cannot overlap a
sibling's exclusive CPUs or contain a sibling's nonempty allowed CPU
mask. Only the top cpuset is memory-exclusive on v2, and it has no
siblings.

Patch 1 skips the sibling walk for partition roots with an empty
explicit exclusive CPU mask and for cpusets that clear their mask.

Patch 2 separates the v1 CPU and memory checks from the v2 CPU checks
so the hierarchy is selected once before the sibling walk.

[1] https://lore.kernel.org/lkml/7b9ec8acd1d5fbc2e977ac08450aaf5de5952ce0.1796039668.git.zhouchuyi@bytedance.com/
[2] https://lore.kernel.org/r/825c0c94-8565-4c4c-82c7-9c0f5872e6a9@linux.dev

Thanks,
Chuyi

Chuyi Zhou (2):
  cgroup/cpuset: Skip v2 sibling checks with an empty exclusive CPU mask
  cgroup/cpuset: Separate v1 and v2 sibling exclusivity checks

 kernel/cgroup/cpuset-internal.h |  6 +--
 kernel/cgroup/cpuset-v1.c       | 36 +++++++++----
 kernel/cgroup/cpuset.c          | 90 +++++++++++++--------------------
 3 files changed, 62 insertions(+), 70 deletions(-)


base-commit: d2184674694f407e88b378f1f99b88d20e01d9da
-- 
2.20.1

             reply	other threads:[~2026-12-02 10:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 10:44 Chuyi Zhou [this message]
2026-12-02 10:44 ` [PATCH 1/2] cgroup/cpuset: Skip v2 sibling checks with an empty exclusive CPU mask Chuyi Zhou
2026-12-02 10:44 ` [PATCH 2/2] cgroup/cpuset: Separate v1 and v2 sibling exclusivity checks Chuyi Zhou

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=cover.1796202058.git.zhouchuyi@bytedance.com \
    --to=zhouchuyi@bytedance.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mkoutny@suse.com \
    --cc=ridong.chen@linux.dev \
    --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