[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zfws04M0p3QUPmPJ@fedora>
Date: Thu, 21 Mar 2024 20:49:23 +0800
From: Ming Lei <ming.lei@...hat.com>
To: Jens Axboe <axboe@...nel.dk>, linux-block@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Tim Chen <tim.c.chen@...ux.intel.com>,
Juri Lelli <juri.lelli@...hat.com>,
Andrew Theurer <atheurer@...hat.com>, Joe Mario <jmario@...hat.com>,
Sebastian Jug <sejug@...hat.com>,
Frederic Weisbecker <frederic@...nel.org>,
Bart Van Assche <bvanassche@....org>, Tejun Heo <tj@...nel.org>,
ming.lei@...hat.com
Subject: Re: [PATCH V4] blk-mq: don't schedule block kworker on isolated CPUs
On Wed, Mar 20, 2024 at 10:34:46AM +0800, Ming Lei wrote:
> Kernel parameter of `isolcpus=` or 'nohz_full=' are used to isolate CPUs
> for specific task, and it isn't expected to let block IO disturb these CPUs.
> blk-mq kworker shouldn't be scheduled on isolated CPUs. Also if isolated
> CPUs is run for blk-mq kworker, long block IO latency can be caused.
>
> Kernel workqueue only respects CPU isolation for WQ_UNBOUND, for bound
> WQ, the responsibility is on user because CPU is specified as WQ API
> parameter, such as mod_delayed_work_on(cpu), queue_delayed_work_on(cpu)
> and queue_work_on(cpu).
>
> So not run blk-mq kworker on isolated CPUs by removing isolated CPUs
> from hctx->cpumask. Meantime use queue map to check if all CPUs in this
> hw queue are offline instead of hctx->cpumask, this way can avoid any
> cost in fast IO code path, and is safe since hctx->cpumask are only
> used in the two cases.
>
> Cc: Tim Chen <tim.c.chen@...ux.intel.com>
> Cc: Juri Lelli <juri.lelli@...hat.com>
> Cc: Andrew Theurer <atheurer@...hat.com>
> Cc: Joe Mario <jmario@...hat.com>
> Cc: Sebastian Jug <sejug@...hat.com>
> Cc: Frederic Weisbecker <frederic@...nel.org>
> Cc: Bart Van Assche <bvanassche@....org>
> Cc: Tejun Heo <tj@...nel.org>
> Tested-by: Joe Mario <jmario@...hat.com>
> Signed-off-by: Ming Lei <ming.lei@...hat.com>
> ---
> V4:
> - improve comment & commit log as suggested by Tim
Hello Jens, Tejun and Guys,
This patch fixes one issue in OpenShift low latency environment, I appreciate
you may take a look at the patch and merge it if you are fine.
Thanks,
Ming
Powered by blists - more mailing lists