[PATCH 1/9] block: don't merge different kinds of P2P transfers in a single bio

Keith Busch kbusch at kernel.org
Tue Jun 10 08:37:30 PDT 2025


On Tue, Jun 10, 2025 at 07:06:39AM +0200, Christoph Hellwig wrote:
> To get out of the DMA mapping helpers having to check every segment for
> it's P2P status, ensure that bios either contain P2P transfers or non-P2P
> transfers, and that a P2P bio only contains ranges from a single device.

I may be out of the loop here. Is this an optimization to make something
easier for the DMA layer? I don't think there's any fundamental reason
why devices like nvme couldn't handle a command that uses memory mixed
among multiple devices and/or host memory, at least.
 
> This means we do the page zone access in the bio add path where it should
> be still page hot, and will only have do the fairly expensive P2P topology
> lookup once per bio down in the DMA mapping path, and only for already
> marked bios.



More information about the Linux-nvme mailing list