Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1615627
| Path | csiph.com!news.redatomik.org!fu-berlin.de!bofh.it!news.nic.it!robomod |
|---|---|
| From | Dan Williams <dan.j.williams@intel.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [RFC 5/8] scatterlist: Modify SG copy functions to support io memory. |
| Date | Tue, 04 Apr 2017 02:10:01 +0200 |
| Message-ID | <tskcN-5Aq-5@gated-at.bofh.it> (permalink) |
| References | <tqQA9-4sB-3@gated-at.bofh.it> <tqQAb-4sB-31@gated-at.bofh.it> <tqZ0J-1qH-9@gated-at.bofh.it> <tr6Yh-6ua-3@gated-at.bofh.it> <tshHY-3Tw-19@gated-at.bofh.it> <tsi1j-40v-9@gated-at.bofh.it> <tsiul-4rW-5@gated-at.bofh.it> <tsiXo-4DT-19@gated-at.bofh.it> <tsjqp-536-5@gated-at.bofh.it> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=n23K3KUvnWOsxhE5LiJTjeVVOxZa/XlZ7UKdAW1ufdE=; b=cl87RJN/SMo8cfyJtOUM1a0/2fas89ZCa5a/t5YPX6mEnYWRjBW9Mhbp0lT3a/uDx9 gvfVLMN9Lro22vEuZSCpHJnlfbAXdY2dX9UMOI4uI0oT/0QO1XBGRAWnCPl9KbN6acTk vVPrJEQ8rBpzUy+Qoa86C2cov1r5le1kVZ9DJJCvGBdghrxjGJD4PI4j6Qd81Oa6nzr5 kRiTAUVzXwQGXD8ee/pR7Q6X0Ml08LQSAWASImtcnqeiYJbh2cfv2iwCi8cc6MRbpNdG 7XWjW0fowTHRXID/200cnI3rsn4hZA6gDhzjAOxqAyNDWfRnD6lYsaIp3Ayd310zVWD8 CJpw== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=n23K3KUvnWOsxhE5LiJTjeVVOxZa/XlZ7UKdAW1ufdE=; b=PXqY63aLemsmx9am5wtRJmYjrjhkQhHpcIS/pP+81tqzwr1qlb9sMZ2vGIk2vanLIR /U92DAU/9byFkcFSTzmBsLXjoJGOL1z09umXpfuXU2MK01oyCM15ps7bC+BEQqPKsuUq xWmaTvKOMaBb1H0YqBsFg6EyAYY3qF24YjqF5d/9rpkM7GQ77E9KxScEW5gUrQcnxaVD tmHSr/cbM98LRB1yYWJ/viUcHDN8w0xVmMgM2SIRVmc2bLOZEOZKlmtmQCN1I1aPSQNy KRd+ZSKM9haKf5MxjOxLCYw1X2gk1XWyDSZLn7uO5j8ZRpSbf/sTRetNynFmLaohoHDM MfCg== |
| X-Gm-Message-State | AFeK/H1w4mpMhVDqMyQEtvliCjtVJt9FGIOsYGq6RoXW36/nawZYSi14uKvWkEZFty5Hg8GOr8fORMlJhzk8Vyte |
| X-Received | by 10.157.3.120 with SMTP id 111mr12034870otv.101.1491264476621; Mon, 03 Apr 2017 17:07:56 -0700 (PDT) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 47 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Christoph Hellwig <hch@infradead.org>, Jens Axboe <axboe@kernel.dk>, Keith Busch <keith.busch@intel.com>, "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>, linux-scsi <linux-scsi@vger.kernel.org>, "Martin K. Petersen" <martin.petersen@oracle.com>, "linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>, linux-rdma@vger.kernel.org, linux-pci@vger.kernel.org, Steve Wise <swise@opengridcomputing.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, linux-nvme@lists.infradead.org, Jason Gunthorpe <jgunthorpe@obsidianresearch.com>, Max Gurtovoy <maxg@mellanox.com>, Christoph Hellwig <hch@lst.de> |
| X-Original-Date | Mon, 3 Apr 2017 17:07:55 -0700 |
| X-Original-Message-ID | <CAPcyv4gL=Z42x52So1iL-MNhPY67Pktz3c0J_h0tj_60TowNuQ@mail.gmail.com> |
| X-Original-References | <1490911959-5146-1-git-send-email-logang@deltatee.com> <1490911959-5146-6-git-send-email-logang@deltatee.com> <20170331070950.GA9059@infradead.org> <435d4471-436b-87e6-8827-c9fc6cbdde2c@deltatee.com> <445bc352-75d7-438f-96ef-c2411215628d@deltatee.com> <CAPcyv4g=MHbjbY0GFPoLq3wAGwhcC7813O7iLUWGEChWh0M7Dw@mail.gmail.com> <ff0dd5ec-2562-9f1d-1335-d0a8813f2f50@deltatee.com> <CAPcyv4gx4g3Ry_A99yTodqwm2vH72oMSLKAKF7iEsmG5G4TcbQ@mail.gmail.com> <22930db3-a194-8b60-5aab-4a8add1ddc55@deltatee.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1615627 |
Show key headers only | View raw
On Mon, Apr 3, 2017 at 4:12 PM, Logan Gunthorpe <logang@deltatee.com> wrote: > > > On 03/04/17 04:47 PM, Dan Williams wrote: >> I wouldn't necessarily conflate supporting pfn_t in the scatterlist >> with the stalled stuct-page-less DMA effor. A pfn_t_to_page() >> conversion will still work and be required. However you're right, the >> minute we use pfn_t for this we're into the realm of special case >> drivers that understand scatterlists with special "I/O-pfn_t" entries. > > Well yes, it would certainly be possible to convert the scatterlist code > from page_link to pfn_t. (The only slightly tricky thing is that > scatterlist uses extra chaining bits and pfn_t uses extra flag bits so > they'd have to be harmonized somehow). But if we aren't moving toward > struct-page-less DMA, I fail to see the point of the conversion. > > I'll definitely need IO scatterlists of some form or another and I like > pfn_t but right now it just seems like extra work with unclear benefit. > (Though, if someone told me that I can't use a third bit in the > page_link field then maybe that would be a good reason to move to pfn_t.) > >> However, maybe that's what we want? I think peer-to-peer DMA is not a >> general purpose feature unless/until we get it standardized in PCI. So >> maybe drivers with special case scatterlist support is exactly what we >> want for now. > > Well, I think this should be completely independent from PCI code. I see > no reason why we can't have infrastructure for DMA on iomem from any > bus. Largely all the work I've done in this area is completely agnostic > to the bus in use. (Except for any kind of white/black list when it is > used.) The completely agnostic part is where I get worried, but I shouldn't say anymore until I actually read the patch.The worry is cases where this agnostic enabling allows unsuspecting code paths to do the wrong thing. Like bypass iomem safety. > The "special case scatterlist" is essentially what I'm proposing in the > patch I sent upthread, it just stores the flag in the page_link instead > of in a pfn_t. Makes sense. The suggestion of pfn_t was to try to get more type safety throughout the stack. So that, again, unsuspecting code paths that get an I/O pfn aren't able to do things like page_address() or kmap() without failing. I'll stop commenting now and set aside some time to go read the patches.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC 0/8] Copy Offload with Peer-to-Peer PCI Memory Logan Gunthorpe <logang@deltatee.com> - 2017-03-31 00:20 +0200
[RFC 1/8] Introduce Peer-to-Peer memory (p2pmem) device Logan Gunthorpe <logang@deltatee.com> - 2017-03-31 00:20 +0200
Re: [RFC 1/8] Introduce Peer-to-Peer memory (p2pmem) device Sinan Kaya <okaya@codeaurora.org> - 2017-03-31 20:50 +0200
Re: [RFC 1/8] Introduce Peer-to-Peer memory (p2pmem) device Logan Gunthorpe <logang@deltatee.com> - 2017-03-31 23:30 +0200
Re: [RFC 1/8] Introduce Peer-to-Peer memory (p2pmem) device Sinan Kaya <okaya@codeaurora.org> - 2017-03-31 23:40 +0200
Re: [RFC 1/8] Introduce Peer-to-Peer memory (p2pmem) device Logan Gunthorpe <logang@deltatee.com> - 2017-04-01 00:50 +0200
Re: [RFC 1/8] Introduce Peer-to-Peer memory (p2pmem) device Sinan Kaya <okaya@codeaurora.org> - 2017-04-01 02:00 +0200
Re: [RFC 1/8] Introduce Peer-to-Peer memory (p2pmem) device Logan Gunthorpe <logang@deltatee.com> - 2017-04-01 04:00 +0200
Re: [RFC 1/8] Introduce Peer-to-Peer memory (p2pmem) device okaya@codeaurora.org - 2017-04-01 04:20 +0200
Re: [RFC 1/8] Introduce Peer-to-Peer memory (p2pmem) device Logan Gunthorpe <logang@deltatee.com> - 2017-04-02 00:20 +0200
Re: [RFC 1/8] Introduce Peer-to-Peer memory (p2pmem) device Sinan Kaya <okaya@codeaurora.org> - 2017-04-02 04:30 +0200
Re: [RFC 1/8] Introduce Peer-to-Peer memory (p2pmem) device Logan Gunthorpe <logang@deltatee.com> - 2017-04-02 19:30 +0200
Re: [RFC 1/8] Introduce Peer-to-Peer memory (p2pmem) device Sinan Kaya <okaya@codeaurora.org> - 2017-04-02 23:10 +0200
Re: [RFC 1/8] Introduce Peer-to-Peer memory (p2pmem) device Logan Gunthorpe <logang@deltatee.com> - 2017-04-03 06:30 +0200
[RFC 4/8] p2pmem: Add debugfs "stats" file Logan Gunthorpe <logang@deltatee.com> - 2017-03-31 00:20 +0200
Re: [RFC 4/8] p2pmem: Add debugfs "stats" file Sagi Grimberg <sagi@grimberg.me> - 2017-04-04 12:50 +0200
Re: [RFC 4/8] p2pmem: Add debugfs "stats" file Logan Gunthorpe <logang@deltatee.com> - 2017-04-04 19:30 +0200
RE: [RFC 4/8] p2pmem: Add debugfs "stats" file "Steve Wise" <swise@opengridcomputing.com> - 2017-04-05 18:20 +0200
[RFC 2/8] cxgb4: setup pcie memory window 4 and create p2pmem region Logan Gunthorpe <logang@deltatee.com> - 2017-03-31 00:20 +0200
Re: [RFC 2/8] cxgb4: setup pcie memory window 4 and create p2pmem region Sagi Grimberg <sagi@grimberg.me> - 2017-04-04 12:50 +0200
Re: [RFC 2/8] cxgb4: setup pcie memory window 4 and create p2pmem region Logan Gunthorpe <logang@deltatee.com> - 2017-04-04 18:00 +0200
RE: [RFC 2/8] cxgb4: setup pcie memory window 4 and create p2pmem region "Steve Wise" <swise@opengridcomputing.com> - 2017-04-05 18:20 +0200
[RFC 5/8] scatterlist: Modify SG copy functions to support io memory. Logan Gunthorpe <logang@deltatee.com> - 2017-03-31 00:20 +0200
Re: [RFC 5/8] scatterlist: Modify SG copy functions to support io memory. Christoph Hellwig <hch@infradead.org> - 2017-03-31 09:20 +0200
Re: [RFC 5/8] scatterlist: Modify SG copy functions to support io memory. Logan Gunthorpe <logang@deltatee.com> - 2017-03-31 17:50 +0200
Re: [RFC 5/8] scatterlist: Modify SG copy functions to support io memory. Logan Gunthorpe <logang@deltatee.com> - 2017-04-03 23:30 +0200
Re: [RFC 5/8] scatterlist: Modify SG copy functions to support io memory. Dan Williams <dan.j.williams@intel.com> - 2017-04-03 23:50 +0200
Re: [RFC 5/8] scatterlist: Modify SG copy functions to support io memory. Logan Gunthorpe <logang@deltatee.com> - 2017-04-04 00:20 +0200
Re: [RFC 5/8] scatterlist: Modify SG copy functions to support io memory. Dan Williams <dan.j.williams@intel.com> - 2017-04-04 00:50 +0200
Re: [RFC 5/8] scatterlist: Modify SG copy functions to support io memory. Logan Gunthorpe <logang@deltatee.com> - 2017-04-04 01:20 +0200
Re: [RFC 5/8] scatterlist: Modify SG copy functions to support io memory. Dan Williams <dan.j.williams@intel.com> - 2017-04-04 02:10 +0200
Re: [RFC 5/8] scatterlist: Modify SG copy functions to support io memory. Logan Gunthorpe <logang@deltatee.com> - 2017-04-07 20:00 +0200
[RFC 8/8] p2pmem: Added char device user interface Logan Gunthorpe <logang@deltatee.com> - 2017-03-31 00:20 +0200
[RFC 7/8] p2pmem: Support device removal Logan Gunthorpe <logang@deltatee.com> - 2017-03-31 00:20 +0200
csiph-web