diff options
| author | Christoph Hellwig <hch@lst.de> | 2025-06-25 14:34:58 +0300 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2025-07-01 00:50:32 +0300 |
| commit | 38446014648c9f7b2843f87517c8f2b73906bb40 (patch) | |
| tree | 9b2a6eea78ce6da1abcbe45ca53c0a88afdcc596 /include/linux | |
| parent | 409f9287dab3b53bffe8d28d883a529028aa6a42 (diff) | |
| download | linux-38446014648c9f7b2843f87517c8f2b73906bb40.tar.xz | |
block: don't merge different kinds of P2P transfers in a single bio
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.
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.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Link: https://lore.kernel.org/r/20250625113531.522027-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/blk_types.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index 930daff207df..09b99d52fd36 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h @@ -386,6 +386,7 @@ enum req_flag_bits { __REQ_DRV, /* for driver use */ __REQ_FS_PRIVATE, /* for file system (submitter) use */ __REQ_ATOMIC, /* for atomic write operations */ + __REQ_P2PDMA, /* contains P2P DMA pages */ /* * Command specific flags, keep last: */ @@ -418,6 +419,7 @@ enum req_flag_bits { #define REQ_DRV (__force blk_opf_t)(1ULL << __REQ_DRV) #define REQ_FS_PRIVATE (__force blk_opf_t)(1ULL << __REQ_FS_PRIVATE) #define REQ_ATOMIC (__force blk_opf_t)(1ULL << __REQ_ATOMIC) +#define REQ_P2PDMA (__force blk_opf_t)(1ULL << __REQ_P2PDMA) #define REQ_NOUNMAP (__force blk_opf_t)(1ULL << __REQ_NOUNMAP) |
