[PATCH V3 2/3] md: propagate BLK_FEAT_PCI_P2PDMA from member devices to RAID device

Yu Kuai yukuai at fnnas.com
Wed May 20 04:56:48 PDT 2026


在 2026/4/17 5:26, Chaitanya Kulkarni 写道:

> From: Kiran Kumar Modukuri<kmodukuri at nvidia.com>
>
> MD RAID does not propagate BLK_FEAT_PCI_P2PDMA from member devices to
> the RAID device, preventing peer-to-peer DMA through the RAID layer even
> when all underlying devices support it.
>
> Enable BLK_FEAT_PCI_P2PDMA unconditionally in raid0, raid1 and raid10
> personalities during queue limits setup.  blk_stack_limits() clears it
> automatically if any member device lacks support, consistent with how
> BLK_FEAT_NOWAIT and BLK_FEAT_POLL are handled in the block core.
>
> Parity RAID personalities (raid4/5/6) are excluded because they require
> CPU access to data pages for parity computation, which is incompatible
> with P2P mappings.
>
> Tested with RAID0/1/10 arrays containing multiple NVMe devices with
> P2PDMA support, confirming that peer-to-peer transfers work correctly
> through the RAID layer.
>
> Signed-off-by: Kiran Kumar Modukuri<kmodukuri at nvidia.com>
> Signed-off-by: Chaitanya Kulkarni<kch at nvidia.com>
> ---
>   drivers/md/raid0.c  | 1 +
>   drivers/md/raid1.c  | 1 +
>   drivers/md/raid10.c | 1 +
>   3 files changed, 3 insertions(+)

Reviewed-by: Yu Kuai <yukuai at fygo.io>

-- 
Thansk,
Kuai



More information about the Linux-nvme mailing list