From: Waiman Long <longman@redhat.com>
To: Tejun Heo <tj@kernel.org>, Zefan Li <lizefan.x@bytedance.com>,
Johannes Weiner <hannes@cmpxchg.org>
Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
Waiman Long <longman@redhat.com>
Subject: [PATCH 0/2] cgroup/cpuset: Task migration optimization
Date: Thu, 8 Dec 2022 14:56:32 -0500 [thread overview]
Message-ID: <20221208195634.2604362-1-longman@redhat.com> (raw)
It is found that workloads that generate a lot of task migrations
among different cpusets are severely throttled because of the use
of percpu rwsem in cpuset_rwsem. It is the same problem that led to
commit 3942a9bd7b58 ("locking, rcu, cgroup: Avoid synchronize_sched()
in __cgroup_procs_write()") and commit 6a010a49b63a ("cgroup: Make
!percpu threadgroup_rwsem operations optional").
The first patch in this series changes cpuset_can_attach() to use
the read lock instead of the write lock. The second patch allows
disabling of percpu reader fast path depending on the presence of
CGRP_ROOT_FAVOR_DYNMODS flag in the cgroup root.
Waiman Long (2):
cgroup/cpuset: Use cpuset_rwsem read lock in cpuset_can_attach()
cgroup/cpuset: Make percpu cpuset_rwsem operation depending on DYNMODS
state
kernel/cgroup/cpuset.c | 75 ++++++++++++++++++++++++++++++++----------
1 file changed, 58 insertions(+), 17 deletions(-)
--
2.31.1
next reply other threads:[~2022-12-08 19:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-08 19:56 Waiman Long [this message]
2022-12-08 19:56 ` [PATCH 1/2] cgroup/cpuset: Use cpuset_rwsem read lock in cpuset_can_attach() Waiman Long
2022-12-08 19:56 ` [PATCH 2/2] cgroup/cpuset: Make percpu cpuset_rwsem operation depending on DYNMODS state Waiman Long
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=20221208195634.2604362-1-longman@redhat.com \
--to=longman@redhat.com \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan.x@bytedance.com \
--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®