Linux block layer
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Ming Lei <ming.lei@redhat.com>, Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Tejun Heo <tj@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 V2] blk-mq: don't schedule block kworker on isolated CPUs
Date: Tue, 24 Oct 2023 09:53:49 -0700	[thread overview]
Message-ID: <293c16d2-f556-4d42-ab06-2e0acf1cc601@acm.org> (raw)
In-Reply-To: <20231013124758.1492796-1-ming.lei@redhat.com>


On 10/13/23 05:47, Ming Lei wrote:
> @@ -3926,6 +3941,15 @@ static void blk_mq_map_swqueue(struct request_queue *q)
>   		 */
>   		sbitmap_resize(&hctx->ctx_map, hctx->nr_ctx);
>   
> +		/*
> +		 * rule out isolated CPUs from hctx->cpumask for avoiding to
> +		 * run wq worker on isolated CPU
> +		 */
> +		for_each_cpu(cpu, hctx->cpumask) {
> +			if (cpu_is_isolated(cpu))
> +				cpumask_clear_cpu(cpu, hctx->cpumask);
> +		}

What will happen if this code makes hctx->cpumask empty? Code like
blk_mq_first_mapped_cpu() and blk_mq_hctx_next_cpu() assumes that
hctx->cpumask is not empty. There may be other code that assumes that
hctx->cpumask is not empty.

Thanks,

Bart.

  parent reply	other threads:[~2023-10-24 16:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-13 12:47 [PATCH V2] blk-mq: don't schedule block kworker on isolated CPUs Ming Lei
2023-10-18  0:52 ` Joe Mario
2023-10-23 23:45 ` Ming Lei
2023-10-24 16:53 ` Bart Van Assche [this message]
2023-10-25  1:05   ` 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=293c16d2-f556-4d42-ab06-2e0acf1cc601@acm.org \
    --to=bvanassche@acm.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 \
    --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