From: Waiman Long <longman@redhat.com>
To: Neeraj Upadhyay <Neeraj.Upadhyay@kernel.org>
Cc: "Paul E. McKenney" <paulmck@kernel.org>,
Frederic Weisbecker <frederic@kernel.org>,
Joel Fernandes <joel@joelfernandes.org>,
Josh Triplett <josh@joshtriplett.org>,
Boqun Feng <boqun.feng@gmail.com>,
Uladzislau Rezki <urezki@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Lai Jiangshan <jiangshanlai@gmail.com>,
Zqiang <qiang.zhang1211@gmail.com>,
rcu@vger.kernel.org, linux-kernel@vger.kernel.org,
Vratislav Bendel <vbendel@redhat.com>
Subject: Re: [PATCH] rcu: Use system_unbound_wq to avoid disturbing isolated CPUs
Date: Thu, 25 Jul 2024 13:02:01 -0400 [thread overview]
Message-ID: <96aec91c-aa5c-4352-b93c-323b22011370@redhat.com> (raw)
In-Reply-To: <20240725153552.GA927762@neeraj.linux>
On 7/25/24 11:35, Neeraj Upadhyay wrote:
> On Tue, Jul 23, 2024 at 02:10:25PM -0400, Waiman Long wrote:
>> It was discovered that isolated CPUs could sometimes be disturbed by
>> kworkers processing kfree_rcu() works causing higher than expected
>> latency. It is because the RCU core uses "system_wq" which doesn't have
>> the WQ_UNBOUND flag to handle all its work items. Fix this violation of
>> latency limits by using "system_unbound_wq" in the RCU core instead.
>> This will ensure that those work items will not be run on CPUs marked
>> as isolated.
>>
> Alternative approach here could be, in case we want to keep per CPU worker
> pools, define a wq with WQ_CPU_INTENSIVE flag. Are there cases where
> WQ_CPU_INTENSIVE wq won't be sufficient for the problem this patch
> is fixing?
What exactly will we gain by defining a WQ_CPU_INTENSIVE workqueue? Or
what will we lose by using system_unbound_wq? All the calls that are
modified to use system_unbound_wq are using WORK_CPU_UNBOUND as their
cpu. IOW, they doesn't care which CPUs are used to run the work items.
The only downside I can see is the possible loss of some cache locality.
In fact, WQ_CPU_INTENSIVE can be considered a subset of WQ_UNBOUND. An
WQ_UNBOUND workqueue will avoid using isolated CPUs, but not a
WQ_CPU_INTENSIVE workqueue.
Cheers,
Longman
next prev parent reply other threads:[~2024-07-25 17:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-23 18:10 [PATCH] rcu: Use system_unbound_wq to avoid disturbing isolated CPUs Waiman Long
2024-07-24 10:30 ` Uladzislau Rezki
2024-07-24 13:30 ` Breno Leitao
2024-07-24 14:23 ` Uladzislau Rezki
2024-07-29 3:06 ` Waiman Long
2024-07-25 15:35 ` Neeraj Upadhyay
2024-07-25 17:02 ` Waiman Long [this message]
2024-07-25 19:33 ` Neeraj Upadhyay
2024-07-25 19:52 ` 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=96aec91c-aa5c-4352-b93c-323b22011370@redhat.com \
--to=longman@redhat.com \
--cc=Neeraj.Upadhyay@kernel.org \
--cc=boqun.feng@gmail.com \
--cc=frederic@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=paulmck@kernel.org \
--cc=qiang.zhang1211@gmail.com \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=urezki@gmail.com \
--cc=vbendel@redhat.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