From: Steven Rostedt <rostedt@goodmis.org>
To: Daniel Wagner <wagi@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>, Hannes Reinecke <hare@suse.de>,
Ming Lei <ming.lei@redhat.com>,
John Garry <john.g.garry@oracle.com>,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] blk-mq: create correct map for fallback case
Date: Thu, 23 Jan 2025 10:18:43 -0500 [thread overview]
Message-ID: <20250123101843.1a682cea@gandalf.local.home> (raw)
In-Reply-To: <20250123-fix-blk_mq_map_hw_queues-v1-1-08dbd01f2c39@kernel.org>
On Thu, 23 Jan 2025 14:08:29 +0100
Daniel Wagner <wagi@kernel.org> wrote:
> The fallback code in blk_mq_map_hw_queues is original from
> blk_mq_pci_map_queues and was added to handle the case where
> pci_irq_get_affinity will return NULL for !SMP configuration.
>
> blk_mq_map_hw_queues replaces besides blk_mq_pci_map_queues also
> blk_mq_virtio_map_queues which used to use blk_mq_map_queues for the
> fallback.
>
> It's possible to use blk_mq_map_queues for both cases though.
> blk_mq_map_queues creates the same map as blk_mq_clear_mq_map for !SMP
> that is CPU 0 will be mapped to hctx 0.
>
> The WARN_ON_ONCE has to be dropped for virtio as the fallback is also
> taken for certain configuration on default. Though there is still a
> WARN_ON_ONCE check in lib/group_cpus.c:
>
> WARN_ON(nr_present + nr_others < numgrps);
>
> which will trigger if the caller tries to create more hardware queues
> than CPUs. It tests the same as the WARN_ON_ONCE in
> blk_mq_pci_map_queues did.
>
> Fixes: a5665c3d150c ("virtio: blk/scsi: replace blk_mq_virtio_map_queues with blk_mq_map_hw_queues")
> Reported-by: Steven Rostedt <rostedt@goodmis.org>
Tested-by: Steven Rostedt (Google) <rostedt@goodmis.org>
-- Steve
> Closes: https://lore.kernel.org/all/20250122093020.6e8a4e5b@gandalf.local.home/
> Signed-off-by: Daniel Wagner <wagi@kernel.org>
> ---
> block/blk-mq-cpumap.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
prev parent reply other threads:[~2025-01-23 15:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-23 13:08 Daniel Wagner
2025-01-23 13:34 ` Jens Axboe
2025-01-23 15:18 ` Steven Rostedt [this message]
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=20250123101843.1a682cea@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=axboe@kernel.dk \
--cc=hare@suse.de \
--cc=john.g.garry@oracle.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=wagi@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®