From patchwork Sun Oct 27 14:21:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 13852653 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 183361D934C; Sun, 27 Oct 2024 14:22:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730038977; cv=none; b=RQZnPnI9o0/cWLes2GZRH2qVPqptnAdzeh4KbTy9+eu08Rzv7Zn0NAFCxx8o05IB9y8MAzgu+JtrJApoAm1XJcB/NFVeE+amqe95kX8AYWVwCyseRoZ8aWLdRA1RWXgtLhh4MtTXYhRFRW36tgzWRFZJmvYBaPEMON8LJM8i9wg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730038977; c=relaxed/simple; bh=BINE0bzsOqI+RjXMn339mOpninDICNxaXannsg5oEKA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=VNcP98z33W0M2UOVBE5QA1HYivxo1gDI0oeLoIQZ4Pr892adB0iLYzzbZksOTxIy36HFNvtEzC2HO1Cw6eToAr16sInR7//QZaUFlBK3FajrHMCspMndX3w3Sxr0yG0LK4o9xSKPtAh8JmEleLWRZdEfeAU8y9km2+SuvDWj3Uo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pd0BzzZL; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pd0BzzZL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 319FEC4CEC3; Sun, 27 Oct 2024 14:22:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730038977; bh=BINE0bzsOqI+RjXMn339mOpninDICNxaXannsg5oEKA=; h=From:To:Cc:Subject:Date:From; b=pd0BzzZLKEzBqB8FWM9UZHam4tYNjsnnks0WcWuSmuuGlWxovKjdQAiI80MVb2wGZ MTG3Xte9Jh0NPOVe8g5i1zq0pO5fVaNHNx2Y5e677UAgwYHjtDxNvA9Zat2wJBBXiz R9aUDLrTH2666bqNkqWn8CjaFttj2+pvGYC79+kM2RvXqapBiYUhaEBxX04LxMqBA5 nEFd2n+xRDKhnirU2/wPoC5KGRP0XTSFPNger8/n0w6gzVIWEHU+Kx5hRf7z0+eAnI hxdNIMaJRWkRkHkRXtlZgB+O6cM86XADyzKCTloRhKNu3+iYzVgS1Hqy8Wx0zQnauc 6bI4K5B/nVNRA== From: Leon Romanovsky To: Jonathan Corbet , Jens Axboe , Jason Gunthorpe , Robin Murphy , Joerg Roedel , Will Deacon , Christoph Hellwig , Sagi Grimberg Cc: Keith Busch , Bjorn Helgaas , Logan Gunthorpe , Yishai Hadas , Shameer Kolothum , Kevin Tian , Alex Williamson , Marek Szyprowski , =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= , Andrew Morton , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-rdma@vger.kernel.org, iommu@lists.linux.dev, linux-nvme@lists.infradead.org, linux-pci@vger.kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org Subject: [RFC PATCH 0/7] Block and NMMe PCI use of new DMA mapping API Date: Sun, 27 Oct 2024 16:21:53 +0200 Message-ID: X-Mailer: git-send-email 2.46.2 Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This is complimentary patchset to the series which adds new DMA mapping API [1]. In this series, Christoph converts existing nvme-pci driver to use new API, which is wrapped by relevant blk-mq helpers, so future blk drivers can reuse them in block layer specific structures. This is posted as RFC as it is under heavy testing now, and presented here to get feedback from the community and show another advanced use case of the new API. Thanks [1] https://lore.kernel.org/all/cover.1730037276.git.leon@kernel.org Christoph Hellwig (7): block: share more code for bio addition helpers block: don't merge different kinds of P2P transfers in a single bio blk-mq: add a dma mapping iterator blk-mq: add scatterlist-less DMA mapping helpers nvme-pci: remove struct nvme_descriptor nvme-pci: use a better encoding for small prp pool allocations nvme-pci: convert to blk_rq_dma_map block/bio.c | 148 ++++++------ block/blk-map.c | 32 ++- block/blk-merge.c | 313 +++++++++++++++++------- drivers/nvme/host/pci.c | 470 +++++++++++++++++++------------------ include/linux/blk-mq-dma.h | 64 +++++ include/linux/blk_types.h | 2 + 6 files changed, 636 insertions(+), 393 deletions(-) create mode 100644 include/linux/blk-mq-dma.h