From: "Zhang, Rui" <rui.zhang@intel.com>
To: "shuah@kernel.org" <shuah@kernel.org>,
"longman@redhat.com" <longman@redhat.com>,
"lizefan.x@bytedance.com" <lizefan.x@bytedance.com>,
"hannes@cmpxchg.org" <hannes@cmpxchg.org>,
"tj@kernel.org" <tj@kernel.org>,
"corbet@lwn.net" <corbet@lwn.net>,
"jiangshanlai@gmail.com" <jiangshanlai@gmail.com>
Cc: "pehunt@redhat.com" <pehunt@redhat.com>,
"frederic@kernel.org" <frederic@kernel.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"cgroups@vger.kernel.org" <cgroups@vger.kernel.org>,
"linux-kselftest@vger.kernel.org"
<linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH v2 0/4] cgroup/cpuset: Improve CPU isolation in isolated partitions
Date: Thu, 9 Nov 2023 09:02:21 +0000 [thread overview]
Message-ID: <98bea19ca5eb5c19ef0ea55f5167237cc841fe9b.camel@intel.com> (raw)
In-Reply-To: <20231025182555.4155614-1-longman@redhat.com>
Hi, Waiman,
May I know which kernel this patch series is based on?
I'd like to test this feature, but cannot apply it cleanly on top of
v6.6.
thanks,
rui
On Wed, 2023-10-25 at 14:25 -0400, Waiman Long wrote:
> v2:
> - Add 2 read-only workqueue sysfs files to expose the user requested
> cpumask as well as the isolated CPUs to be excluded from
> wq_unbound_cpumask.
> - Ensure that caller of the new workqueue_unbound_exclude_cpumask()
> hold cpus_read_lock.
> - Update the cpuset code to make sure the cpus_read_lock is held
> whenever workqueue_unbound_exclude_cpumask() may be called.
>
> Isolated cpuset partition can currently be created to contain an
> exclusive set of CPUs not used in other cgroups and with load
> balancing
> disabled to reduce interference from the scheduler.
>
> The main purpose of this isolated partition type is to dynamically
> emulate what can be done via the "isolcpus" boot command line option,
> specifically the default domain flag. One effect of the "isolcpus"
> option
> is to remove the isolated CPUs from the cpumasks of unbound
> workqueues
> since running work functions in an isolated CPU can be a major source
> of interference. Changing the unbound workqueue cpumasks can be done
> at
> run time by writing an appropriate cpumask without the isolated CPUs
> to
> /sys/devices/virtual/workqueue/cpumask. So one can set up an isolated
> cpuset partition and then write to the cpumask sysfs file to achieve
> similar level of CPU isolation. However, this manual process can be
> error prone.
>
> This patch series implements automatic exclusion of isolated CPUs
> from
> unbound workqueue cpumasks when an isolated cpuset partition is
> created
> and then adds those CPUs back when the isolated partition is
> destroyed.
>
> There are also other places in the kernel that look at the
> HK_FLAG_DOMAIN
> cpumask or other HK_FLAG_* cpumasks and exclude the isolated CPUs
> from
> certain actions to further reduce interference. CPUs in an isolated
> cpuset partition will not be able to avoid those interferences yet.
> That
> may change in the future as the need arises.
>
> Waiman Long (4):
> workqueue: Add workqueue_unbound_exclude_cpumask() to exclude CPUs
> from wq_unbound_cpumask
> selftests/cgroup: Minor code cleanup and reorganization of
> test_cpuset_prs.sh
> cgroup/cpuset: Keep track of CPUs in isolated partitions
> cgroup/cpuset: Take isolated CPUs out of workqueue unbound cpumask
>
> Documentation/admin-guide/cgroup-v2.rst | 10 +-
> include/linux/workqueue.h | 2 +-
> kernel/cgroup/cpuset.c | 286 +++++++++++++---
> --
> kernel/workqueue.c | 91 +++++-
> .../selftests/cgroup/test_cpuset_prs.sh | 216 ++++++++-----
> 5 files changed, 438 insertions(+), 167 deletions(-)
>
next prev parent reply other threads:[~2023-11-09 9:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-25 18:25 [PATCH v2 0/4] cgroup/cpuset: Improve CPU isolation in isolated partitions Waiman Long
2023-10-25 18:25 ` [PATCH v2 1/4] workqueue: Add workqueue_unbound_exclude_cpumask() to exclude CPUs from wq_unbound_cpumask Waiman Long
2023-10-25 18:25 ` [PATCH v2 2/4] selftests/cgroup: Minor code cleanup and reorganization of test_cpuset_prs.sh Waiman Long
2023-10-25 18:25 ` [PATCH v2 3/4] cgroup/cpuset: Keep track of CPUs in isolated partitions Waiman Long
2023-10-25 18:25 ` [PATCH v2 4/4] cgroup/cpuset: Take isolated CPUs out of workqueue unbound cpumask Waiman Long
2023-11-09 9:02 ` Zhang, Rui [this message]
2023-11-10 1:24 ` [PATCH v2 0/4] cgroup/cpuset: Improve CPU isolation in isolated partitions Waiman Long
2023-11-12 21:10 ` 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=98bea19ca5eb5c19ef0ea55f5167237cc841fe9b.camel@intel.com \
--to=rui.zhang@intel.com \
--cc=cgroups@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=frederic@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=jiangshanlai@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=lizefan.x@bytedance.com \
--cc=longman@redhat.com \
--cc=pehunt@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.