Commit 6a84ea41 authored by Daniel Wagner's avatar Daniel Wagner Committed by Greg Kroah-Hartman
Browse files

UPSTREAM: blk-mq: introduce blk_mq_map_hw_queues



[ Upstream commit 1452e9b4 ]

blk_mq_pci_map_queues and blk_mq_virtio_map_queues will create a CPU to
hardware queue mapping based on affinity information. These two function
share common code and only differ on how the affinity information is
retrieved. Also, those functions are located in the block subsystem
where it doesn't really fit in. They are virtio and pci subsystem
specific.

Thus introduce provide a generic mapping function which uses the
irq_get_affinity callback from bus_type.

Originally idea from Ming Lei <ming.lei@redhat.com>

Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
Reviewed-by: default avatarJohn Garry <john.g.garry@oracle.com>
Change-Id: I1ed5cd7f652d6b487822400bcf6cc7b83779c645
Signed-off-by: default avatarDaniel Wagner <wagi@kernel.org>
Link: https://lore.kernel.org/r/20241202-refactor-blk-affinity-helpers-v6-4-27211e9c2cd5@kernel.org


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Stable-dep-of: a2d5a007 ("scsi: smartpqi: Use is_kdump_kernel() to check for kdump")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
(cherry picked from commit fe2bdefe)
Bug: 437846539
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent ae8d120d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment