linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCHSET v2 0/14] blk-mq: Add support for multiple queue maps
Date: Mon, 29 Oct 2018 10:37:24 -0600	[thread overview]
Message-ID: <20181029163738.10172-1-axboe@kernel.dk> (raw)

This series adds support for multiple queue maps for blk-mq.
Since blk-mq was introduced, it's only support a single queue
map. This means you can have 1 set of queues, and the mapping
purely depends on what CPU an IO originated from. With this
patch set, drivers can implement mappings that depend on both
CPU and request type - and they can have multiple sets of mappings.

NVMe is used as a proof of concept. It adds support for a separate
write queue set. One way to use this would be to limit the number
of write queues to favor reads, since NVMe does round-robin service
of queues. An easy extension of this would be to add multiple
sets of queues, for prioritized IO.

NVMe also uses this feature to finally make the polling work
efficiently, without triggering interrupts. This both increases
performance (and decreases latency), at a lower system load. At
the same time it's more flexible, as you don't have to worry about
IRQ coalescing and redirection to avoid interrupts disturbing the
workload. This is how polling should have worked from day 1.

This is on top of the mq-conversions branch and series just
posted. It can also be bound in my mq-maps branch.

Changes since v1:

- Ensure irq_calc_affinity_vectors() doesn't return more than 'maxvec'
- Rebase on top of current mq-conversions series

 block/blk-flush.c                     |   7 +-
 block/blk-mq-cpumap.c                 |  19 +--
 block/blk-mq-debugfs.c                |   4 +-
 block/blk-mq-pci.c                    |  10 +-
 block/blk-mq-rdma.c                   |   4 +-
 block/blk-mq-sched.c                  |  18 ++-
 block/blk-mq-sysfs.c                  |  10 ++
 block/blk-mq-tag.c                    |   5 +-
 block/blk-mq-virtio.c                 |   8 +-
 block/blk-mq.c                        | 213 ++++++++++++++++++++----------
 block/blk-mq.h                        |  29 ++++-
 block/blk.h                           |   6 +-
 block/kyber-iosched.c                 |   6 +-
 drivers/block/virtio_blk.c            |   2 +-
 drivers/nvme/host/pci.c               | 238 ++++++++++++++++++++++++++++++----
 drivers/scsi/qla2xxx/qla_os.c         |   5 +-
 drivers/scsi/scsi_lib.c               |   2 +-
 drivers/scsi/smartpqi/smartpqi_init.c |   3 +-
 drivers/scsi/virtio_scsi.c            |   3 +-
 fs/block_dev.c                        |   2 +
 fs/direct-io.c                        |   2 +
 fs/iomap.c                            |   9 +-
 include/linux/blk-mq-pci.h            |   4 +-
 include/linux/blk-mq-virtio.h         |   4 +-
 include/linux/blk-mq.h                |  24 +++-
 include/linux/blk_types.h             |   4 +-
 include/linux/blkdev.h                |   2 -
 include/linux/interrupt.h             |   4 +
 kernel/irq/affinity.c                 |  40 ++++--
 29 files changed, 526 insertions(+), 161 deletions(-)



             reply	other threads:[~2018-10-29 16:37 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-29 16:37 Jens Axboe [this message]
2018-10-29 16:37 ` [PATCH 01/14] blk-mq: kill q->mq_map Jens Axboe
2018-10-29 16:46   ` Bart Van Assche
2018-10-29 16:51     ` Jens Axboe
2018-10-29 16:37 ` [PATCH 02/14] blk-mq: abstract out queue map Jens Axboe
2018-10-29 18:33   ` Bart Van Assche
2018-10-29 16:37 ` [PATCH 03/14] blk-mq: provide dummy blk_mq_map_queue_type() helper Jens Axboe
2018-10-29 17:22   ` Bart Van Assche
2018-10-29 17:27     ` Jens Axboe
2018-10-29 16:37 ` [PATCH 04/14] blk-mq: pass in request/bio flags to queue mapping Jens Axboe
2018-10-29 17:30   ` Bart Van Assche
2018-10-29 17:33     ` Jens Axboe
2018-10-29 16:37 ` [PATCH 05/14] blk-mq: allow software queue to map to multiple hardware queues Jens Axboe
2018-10-29 17:34   ` Bart Van Assche
2018-10-29 17:35     ` Jens Axboe
2018-10-29 16:37 ` [PATCH 06/14] blk-mq: add 'type' attribute to the sysfs hctx directory Jens Axboe
2018-10-29 17:40   ` Bart Van Assche
2018-10-29 16:37 ` [PATCH 07/14] blk-mq: support multiple hctx maps Jens Axboe
2018-10-29 18:15   ` Bart Van Assche
2018-10-29 19:24     ` Jens Axboe
2018-10-29 16:37 ` [PATCH 08/14] blk-mq: separate number of hardware queues from nr_cpu_ids Jens Axboe
2018-10-29 18:31   ` Bart Van Assche
2018-10-29 16:37 ` [PATCH 09/14] blk-mq: ensure that plug lists don't straddle hardware queues Jens Axboe
2018-10-29 19:27   ` Bart Van Assche
2018-10-29 19:30     ` Jens Axboe
2018-10-29 19:49       ` Jens Axboe
2018-10-30  8:08         ` Ming Lei
2018-10-30 17:22           ` Jens Axboe
2018-10-29 16:37 ` [PATCH 10/14] blk-mq: initial support for multiple queue maps Jens Axboe
2018-10-29 19:40   ` Bart Van Assche
2018-10-29 19:53     ` Jens Axboe
2018-10-29 20:00       ` Bart Van Assche
2018-10-29 20:09         ` Jens Axboe
2018-10-29 20:25           ` Bart Van Assche
2018-10-29 20:29             ` Jens Axboe
2018-10-29 16:37 ` [PATCH 11/14] irq: add support for allocating (and affinitizing) sets of IRQs Jens Axboe
2018-10-29 17:08   ` Thomas Gleixner
2018-10-29 17:09     ` Jens Axboe
2018-10-30  9:25   ` Ming Lei
2018-10-30 14:26   ` Keith Busch
2018-10-30 14:36     ` Jens Axboe
2018-10-30 14:45       ` Keith Busch
2018-10-30 14:53         ` Jens Axboe
2018-10-30 15:08           ` Keith Busch
2018-10-30 15:18             ` Jens Axboe
2018-10-30 16:02               ` Keith Busch
2018-10-30 16:42                 ` Jens Axboe
2018-10-30 17:09                   ` Jens Axboe
2018-10-30 17:22                     ` Keith Busch
2018-10-30 17:33                       ` Jens Axboe
2018-10-30 17:35                         ` Keith Busch
2018-10-30 17:25                   ` Thomas Gleixner
2018-10-30 17:34                     ` Jens Axboe
2018-10-30 17:43                       ` Jens Axboe
2018-10-30 17:46                       ` Thomas Gleixner
2018-10-30 17:47                         ` Jens Axboe
2018-10-29 16:37 ` [PATCH 12/14] nvme: utilize two queue maps, one for reads and one for writes Jens Axboe
2018-10-29 16:37 ` [PATCH 13/14] block: add REQ_HIPRI and inherit it from IOCB_HIPRI Jens Axboe
2018-10-29 16:37 ` [PATCH 14/14] nvme: add separate poll queue map Jens Axboe

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=20181029163738.10172-1-axboe@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.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;
as well as URLs for NNTP newsgroup(s).