Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Daniel Wagner <wagi@kernel.org>
To: Jens Axboe <axboe@kernel.dk>, Bjorn Helgaas <bhelgaas@google.com>,
	 "Michael S. Tsirkin" <mst@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	 "Martin K. Petersen" <martin.petersen@oracle.com>,
	 Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@lst.de>,
	 Sagi Grimberg <sagi@grimberg.me>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-pci@vger.kernel.org, virtualization@lists.linux.dev,
	 linux-scsi@vger.kernel.org, megaraidlinux.pdl@broadcom.com,
	 mpi3mr-linuxdrv.pdl@broadcom.com,
	MPT-FusionLinux.pdl@broadcom.com,  storagedev@microchip.com,
	linux-nvme@lists.infradead.org,  Daniel Wagner <dwagner@suse.de>,
	Daniel Wagner <wagi@kernel.org>
Subject: [PATCH v2 0/6] blk: refactor queue affinity helpers
Date: Mon, 11 Nov 2024 19:02:08 +0100	[thread overview]
Message-ID: <20241111-refactor-blk-affinity-helpers-v2-0-f360ddad231a@kernel.org> (raw)

As Christoph suggested, I introduced a new callback to struct bus_type
and hooked up the callbacks directly in virtio and pci subsystem. This
looks pretty neat!

I've decided to provide only one version of blk_mq_hctx_map_queues but
with an additional argument to pass in a driver specific callback.

Currently, there is only one user of this additional callback. Maybe it
would be better to provide an variant of blk_mq_hctx_map_queues for the
additional argument. Not sure though. Thoughts?

Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
Changes in v2:
- added new callback to struct bus_type and call directly the affinity
  helpers from there.
- Link to v1: https://lore.kernel.org/r/20240913-refactor-blk-affinity-helpers-v1-0-8e058f77af12@suse.de

Changes in v1:
- renamed blk_mq_dev_map_queues to blk_mq_hctx_map_queues
- squased 'virito: add APIs for retrieving vq affinity' into
  'blk-mq: introduce blk_mq_hctx_map_queues'
- moved hisi_sas changed into a new patch
- hisi_sas use define instead of hard coded value
- moved helpers into their matching subsystem, removed
  blk-mq-pci and blk-mq-virtio files
- fix spelling/typos
- fixed long lines in docu (yep new lines in brief descriptions are
  supported, tested ti)
- based on the first part of
  https://lore.kernel.org/all/20240806-isolcpus-io-queues-v3-0-da0eecfeaf8b@suse.de

---
Daniel Wagner (6):
      blk-mq: introduce blk_mq_hctx_map_queues
      scsi: replace blk_mq_pci_map_queues with blk_mq_hctx_map_queues
      scsi: hisi_sas: replace blk_mq_pci_map_queues with blk_mq_hctx_map_queues
      nvme: replace blk_mq_pci_map_queues with blk_mq_hctx_map_queues
      virtio: blk/scsi: replace blk_mq_virtio_map_queues with blk_mq_hctx_map_queues
      blk-mq: remove unused queue mapping helpers

 block/Makefile                            |  2 --
 block/blk-mq-cpumap.c                     | 40 +++++++++++++++++++++++++++
 block/blk-mq-pci.c                        | 46 -------------------------------
 block/blk-mq-virtio.c                     | 46 -------------------------------
 drivers/block/virtio_blk.c                |  4 +--
 drivers/nvme/host/fc.c                    |  1 -
 drivers/nvme/host/pci.c                   |  3 +-
 drivers/pci/pci-driver.c                  | 16 +++++++++++
 drivers/scsi/fnic/fnic_main.c             |  3 +-
 drivers/scsi/hisi_sas/hisi_sas.h          |  1 -
 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c    | 22 +++++++--------
 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c    |  4 +--
 drivers/scsi/megaraid/megaraid_sas_base.c |  3 +-
 drivers/scsi/mpi3mr/mpi3mr.h              |  1 -
 drivers/scsi/mpi3mr/mpi3mr_os.c           |  3 +-
 drivers/scsi/mpt3sas/mpt3sas_scsih.c      |  4 +--
 drivers/scsi/pm8001/pm8001_init.c         |  2 +-
 drivers/scsi/pm8001/pm8001_sas.h          |  1 -
 drivers/scsi/qla2xxx/qla_nvme.c           |  4 +--
 drivers/scsi/qla2xxx/qla_os.c             |  4 +--
 drivers/scsi/smartpqi/smartpqi_init.c     |  7 ++---
 drivers/scsi/virtio_scsi.c                |  3 +-
 drivers/virtio/virtio.c                   | 12 ++++++++
 include/linux/blk-mq-pci.h                | 11 --------
 include/linux/blk-mq-virtio.h             | 11 --------
 include/linux/blk-mq.h                    |  5 ++++
 include/linux/device/bus.h                |  3 ++
 27 files changed, 107 insertions(+), 155 deletions(-)
---
base-commit: c9af98a7e8af266bae73e9d662b8341da1ec5824
change-id: 20240912-refactor-blk-affinity-helpers-7089b95b4b10

Best regards,
-- 
Daniel Wagner <wagi@kernel.org>


             reply	other threads:[~2024-11-11 18:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-11 18:02 Daniel Wagner [this message]
2024-11-11 18:02 ` [PATCH v2 1/6] blk-mq: introduce blk_mq_hctx_map_queues Daniel Wagner
2024-11-11 19:00   ` Bjorn Helgaas
2024-11-12  4:47   ` Christoph Hellwig
2024-11-12  7:08     ` Daniel Wagner
2024-11-11 18:02 ` [PATCH v2 2/6] scsi: replace blk_mq_pci_map_queues with blk_mq_hctx_map_queues Daniel Wagner
2024-11-12  4:48   ` Christoph Hellwig
2024-11-11 18:02 ` [PATCH v2 3/6] scsi: hisi_sas: " Daniel Wagner
2024-11-11 18:02 ` [PATCH v2 4/6] nvme: " Daniel Wagner
2024-11-11 18:02 ` [PATCH v2 5/6] virtio: blk/scsi: replace blk_mq_virtio_map_queues " Daniel Wagner
2024-11-12  4:48   ` Christoph Hellwig
2024-11-11 18:02 ` [PATCH v2 6/6] blk-mq: remove unused queue mapping helpers Daniel Wagner
2024-11-12  4:48   ` Christoph Hellwig

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=20241111-refactor-blk-affinity-helpers-v2-0-f360ddad231a@kernel.org \
    --to=wagi@kernel.org \
    --cc=MPT-FusionLinux.pdl@broadcom.com \
    --cc=axboe@kernel.dk \
    --cc=bhelgaas@google.com \
    --cc=dwagner@suse.de \
    --cc=hch@lst.de \
    --cc=jasowang@redhat.com \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=megaraidlinux.pdl@broadcom.com \
    --cc=mpi3mr-linuxdrv.pdl@broadcom.com \
    --cc=mst@redhat.com \
    --cc=sagi@grimberg.me \
    --cc=storagedev@microchip.com \
    --cc=virtualization@lists.linux.dev \
    /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