From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758622AbdDSBTL (ORCPT ); Tue, 18 Apr 2017 21:19:11 -0400 Received: from gate.crashing.org ([63.228.1.57]:59706 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758113AbdDSBTJ (ORCPT ); Tue, 18 Apr 2017 21:19:09 -0400 Message-ID: <1492564669.25766.122.camel@kernel.crashing.org> Subject: Re: [RFC 0/8] Copy Offload with Peer-to-Peer PCI Memory From: Benjamin Herrenschmidt To: Logan Gunthorpe , Dan Williams , Jerome Glisse Cc: Jason Gunthorpe , Bjorn Helgaas , Christoph Hellwig , Sagi Grimberg , "James E.J. Bottomley" , "Martin K. Petersen" , Jens Axboe , Steve Wise , Stephen Bates , Max Gurtovoy , Keith Busch , linux-pci@vger.kernel.org, linux-scsi , linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org, linux-nvdimm , "linux-kernel@vger.kernel.org" Date: Wed, 19 Apr 2017 11:17:49 +1000 In-Reply-To: <1cdeee61-2107-a392-4e5e-77a6aa10354f@deltatee.com> References: <1492381396.25766.43.camel@kernel.crashing.org> <20170418164557.GA7181@obsidianresearch.com> <20170418190138.GH7181@obsidianresearch.com> <1565047873.28680036.1492547352121.JavaMail.zimbra@redhat.com> <1cdeee61-2107-a392-4e5e-77a6aa10354f@deltatee.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6 (3.22.6-1.fc25) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2017-04-18 at 14:48 -0600, Logan Gunthorpe wrote: > > ...and that dma_map goes through get_dma_ops(), so I don't see the conflict? > > The main conflict is in dma_map_sg which only does get_dma_ops once but > the sg may contain memory of different types. We can handle that in our "overriden" dma ops. It's a bit tricky but it *could* break it down into segments and forward portions back to the original dma ops. Ben.