[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f9e660cd-b597-bb6e-56a2-82fe71cb3649@deltatee.com>
Date: Wed, 5 Sep 2018 14:32:06 -0600
From: Logan Gunthorpe <logang@...tatee.com>
To: Jens Axboe <axboe@...nel.dk>, Christoph Hellwig <hch@....de>
Cc: linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
linux-nvme@...ts.infradead.org, linux-rdma@...r.kernel.org,
linux-nvdimm@...ts.01.org, linux-block@...r.kernel.org,
Stephen Bates <sbates@...thlin.com>,
Keith Busch <keith.busch@...el.com>,
Sagi Grimberg <sagi@...mberg.me>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Jason Gunthorpe <jgg@...lanox.com>,
Max Gurtovoy <maxg@...lanox.com>,
Dan Williams <dan.j.williams@...el.com>,
Jérôme Glisse <jglisse@...hat.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Alex Williamson <alex.williamson@...hat.com>,
Christian König <christian.koenig@....com>
Subject: Re: [PATCH v5 07/13] block: Add PCI P2P flag for request queue and
check support for requests
On 05/09/18 02:19 PM, Jens Axboe wrote:
> On 9/5/18 2:18 PM, Logan Gunthorpe wrote:
>>
>>
>> On 05/09/18 02:14 PM, Jens Axboe wrote:
>>> But if the caller must absolutely know where the bio will end up, then
>>> it seems super redundant. So I'd vote for killing this check, it buys
>>> us absolutely nothing and isn't even exhaustive in its current form.
>>
>>
>> Ok, I'll remove it for v6.
>
> Since the drivers needs to know it's doing it right, it might not
> hurt to add a sanity check helper for that. Just have the driver
> call it, and don't add it in the normal IO submission path.
I'm not sure I really see the value in that. It's the same principle in
asking the driver to do the WARN: if the developer knew enough to use
the special helper, they probably knew well enough to do the rest correctly.
I guess one other thing to point out is that, on x86, if a driver
submits P2P pages to a PCI device that doesn't have kernel support,
everything will likely just work. Even though the driver isn't doing any
of the work correctly and the requests are not being mapped with
pci_p2pdma_map() functions. Such code on other arches would likely
break. So developers may be lulled into thinking they're doing the
correct thing when in fact they are not and the WARN in the common code
would prevent that.
Logan
Powered by blists - more mailing lists