[PATCH 1/2] md: Add PCI_P2PDMA support for MD RAID volumes
Keith Busch
kbusch at kernel.org
Tue Mar 24 15:08:33 PDT 2026
On Tue, Mar 24, 2026 at 09:43:15PM +0000, Kiran Modukuri wrote:
> Hi Keith,
>
> So do you suggest we leave the current patch as is without restricting the P2PDMA support for RAID4/5 or restrict the support only for the RAID0, RAID1 and RAID10.
I think you currently have to remove it. If you want to do parity
against P2P memory (which sounds like like a nice feature to me), then
you'd have introduce a prep patch to detect that an xor dma offload
exists for the raid volume to use, and do something to ensure it will
always get offloaded for P2P memory instead of falling back to the CPU
driven synchronous implementation.
Unrelated suggestion, you need to change your email client settings to
plain text in order for the mailing list to accept the message.
> From: Keith Busch <kbusch at kernel.org>
> Date: Tuesday, March 24, 2026 at 2:29 PM
> To: Kiran Modukuri <kmodukuri at nvidia.com>
> Cc: Christoph Hellwig <hch at lst.de>, Chaitanya Kulkarni <kch at nvidia.com>, song at kernel.org <song at kernel.org>, yukuai at fnnas.com <yukuai at fnnas.com>, linan122 at huawei.com <linan122 at huawei.com>, axboe at kernel.dk <axboe at kernel.dk>, sagi at grimberg.me <sagi at grimberg.me>, linux-raid at vger.kernel.org <linux-raid at vger.kernel.org>, linux-nvme at lists.infradead.org <linux-nvme at lists.infradead.org>
> Subject: Re: [PATCH 1/2] md: Add PCI_P2PDMA support for MD RAID volumes
>
> On Tue, Mar 24, 2026 at 09:13:55PM +0000, Kiran Modukuri wrote:
> > Hi Christoph,
> >
> > We tested with RAID0 , RAID1 and RAID10 only. You're right that parity RAID personalities
> > need CPU access to data pages for XOR/parity computation, which won't
> > work with P2P mappings.
> >
> >
> > We'll send a v2 that moves BLK_FEAT_PCI_P2PDMA out of
> > md_init_stacking_limits() and instead has raid0, raid1 and raid10
> > opt in individually during their queue limits setup. raid4/5/6 will
> > not set the flag.
>
> I think the parity could work with P2P memory if the calculation is
> offloaded to a dma_aysnc_tx. It doesn't look like we necessarily know if
> any particular xor is going to get offloaded, though.
More information about the Linux-nvme
mailing list