From patchwork Thu Oct 25 21:16:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 10656597 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A719014BB for ; Thu, 25 Oct 2018 21:16:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A0B32C463 for ; Thu, 25 Oct 2018 21:16:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B8E52C64C; Thu, 25 Oct 2018 21:16:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2CBAD2C463 for ; Thu, 25 Oct 2018 21:16:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726075AbeJZFut (ORCPT ); Fri, 26 Oct 2018 01:50:49 -0400 Received: from mail-it1-f193.google.com ([209.85.166.193]:36341 "EHLO mail-it1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726065AbeJZFut (ORCPT ); Fri, 26 Oct 2018 01:50:49 -0400 Received: by mail-it1-f193.google.com with SMTP id h14-v6so3646896itf.1 for ; Thu, 25 Oct 2018 14:16:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=a58+SrtwlT8D+sCYwEC2ovmIwBJTbBhSf546UcrRqA4=; b=tlapPH2O14bAWL3eg2FqDX1XRfNDWurj48W+D+sQThLpH4TkIzDx2YDKj5E9EDMG7E duZV5YocZLjq144snSjSBy9rziAXvwgZZD6jrvmmvfXuUAl3es9F9Iih6YAz42iOrVvh crKXZ+6i3d1WwJKH8UBuj1p63RvjRs3rryzvyGf5KpnI9yomDMk4ErTO/f0a7xzAKLWi cdEDJUZYhjl3SWdzBQkkZOvx3oCq0+uki7/Mm3ybC7QxrY0sylYb9ZHBxlM3e9cd16fQ TDRSKpYX7loLvANmZj1lk8vPqulP4n3jegBfOgG1HEaa0AIzSDXIfV0SRXIC4tVGzcdB nBPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=a58+SrtwlT8D+sCYwEC2ovmIwBJTbBhSf546UcrRqA4=; b=JFz4W65gsgKBtJR/hfNdleKoYW9fmhZO/zO8tJu9ZSielSfqjsgnsshdTIe66Sku5z kYodTx8bD3P6hMdeVcFsEpf3d1ILdwZtJQXIxAnpgK+v2SNmhiPXvptw2ao8WG7Ae+eP p1fArLDQW1y5bP/H40IrFGBgkC+Oihu9FqW82yv28MZ7u3jd1EdyI56+kWk7IFWSBl3K 4QvSn6lYhtvclPe4t/UrCDPLjwmFjKyrqsnp3HGFPpi2kwvFQfF3Ql2Yy6YA7LguOr6b BqWOHCyMNpRZEK68Uq8yL21J/7CC787kAQhgWp5s/AFirLF7gxePr61+rarfdOdrId8a Uquw== X-Gm-Message-State: AGRZ1gK3xw3/wpAgmEnLOmd7ORLyOfe2XEjSb2FYUNlkQh+V2xxFJU0C Q9ypti9MfQJv+k6I9Uwj88knSAJMqyTYow== X-Google-Smtp-Source: AJdET5d4Ttoa82aRn8E560nTd9LqSyZ297XR5GDMlWaTJiQS0ibM1I4pua2cOntnT4aufFnVwrEuVQ== X-Received: by 2002:a24:c054:: with SMTP id u81-v6mr2120033itf.36.1540502189989; Thu, 25 Oct 2018 14:16:29 -0700 (PDT) Received: from localhost.localdomain ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id l23-v6sm2831890ioj.40.2018.10.25.14.16.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Oct 2018 14:16:28 -0700 (PDT) From: Jens Axboe To: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org Subject: [PATCHSET 0/14] Add support for multiple queue maps Date: Thu, 25 Oct 2018 15:16:12 -0600 Message-Id: <20181025211626.12692-1-axboe@kernel.dk> X-Mailer: git-send-email 2.17.1 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. 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 | 31 ++++- 29 files changed, 520 insertions(+), 158 deletions(-)