From: Tejun Heo <tj@kernel.org>
To: Ming Lei <ming.lei@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
Juri Lelli <juri.lelli@redhat.com>,
Andrew Theurer <atheurer@redhat.com>,
Joe Mario <jmario@redhat.com>, Sebastian Jug <sejug@redhat.com>,
Frederic Weisbecker <frederic@kernel.org>
Subject: Re: [PATCH] blk-mq: add module parameter to not run block kworker on isolated CPUs
Date: Tue, 10 Oct 2023 08:45:44 -1000 [thread overview]
Message-ID: <ZSWb2DNV9cIPYv5H@slm.duckdns.org> (raw)
In-Reply-To: <20231010142216.1114752-1-ming.lei@redhat.com>
(cc'ing Frederic)
On Tue, Oct 10, 2023 at 10:22:16PM +0800, Ming Lei wrote:
> Kernel parameter of `isolcpus=` is used for isolating CPUs for specific
> task, and user often won't want block IO to disturb these CPUs, also long
> IO latency may be caused if blk-mq kworker is scheduled on these isolated
> CPUs.
>
> Kernel workqueue only respects this limit for WQ_UNBOUND, for bound wq,
> the responsibility should be on wq user.
>
> Add one block layer parameter for not running block kworker on isolated
> CPUs.
>
> Cc: Juri Lelli <juri.lelli@redhat.com>
> Cc: Andrew Theurer <atheurer@redhat.com>
> Cc: Joe Mario <jmario@redhat.com>
> Cc: Sebastian Jug <sejug@redhat.com>
> Signed-off-by: Ming Lei <ming.lei@redhat.com>
> ---
> block/blk-mq.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index ec922c6bccbe..c53b5b522053 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -29,6 +29,7 @@
> #include <linux/prefetch.h>
> #include <linux/blk-crypto.h>
> #include <linux/part_stat.h>
> +#include <linux/sched/isolation.h>
>
> #include <trace/events/block.h>
>
> @@ -42,6 +43,13 @@
> #include "blk-rq-qos.h"
> #include "blk-ioprio.h"
>
> +static bool respect_cpu_isolation;
> +module_param(respect_cpu_isolation, bool, 0444);
> +MODULE_PARM_DESC(respect_cpu_isolation,
> + "Don't schedule blk-mq worker on isolated CPUs passed in "
> + "isolcpus= or nohz_full=. User need to guarantee to not run "
> + "block IO on isolated CPUs (default: false)");
Any chance we can centralize these? It's no fun to try to hunt down module
params to opt in different subsystems and the housekeeping interface does
have some provisions for selecting different parts. I'd much prefer to see
these settings to be collected into a central place.
Thanks.
--
tejun
next prev parent reply other threads:[~2023-10-10 18:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-10 14:22 [PATCH] blk-mq: add module parameter to not run block kworker on isolated CPUs Ming Lei
2023-10-10 18:45 ` Tejun Heo [this message]
2023-10-11 0:39 ` Ming Lei
2023-10-12 19:55 ` Tejun Heo
2023-10-13 2:01 ` Ming Lei
2023-10-13 11:26 ` Frederic Weisbecker
2023-10-13 12:23 ` Ming Lei
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=ZSWb2DNV9cIPYv5H@slm.duckdns.org \
--to=tj@kernel.org \
--cc=atheurer@redhat.com \
--cc=axboe@kernel.dk \
--cc=frederic@kernel.org \
--cc=jmario@redhat.com \
--cc=juri.lelli@redhat.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=sejug@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