linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Bates <Stephen.Bates@pmcs.com>
To: Haggai Eran <haggaie@mellanox.com>,
	Sagi Grimberg <sagig@dev.mellanox.co.il>,
	Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
	Christoph Hellwig <hch@infradead.org>,
	"'Logan Gunthorpe' (logang@deltatee.com)" <logang@deltatee.com>
Cc: Artemy Kovalyov <artemyko@mellanox.com>,
	"dledford@redhat.com" <dledford@redhat.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Leon Romanovsky <leonro@mellanox.com>,
	"sagig@mellanox.com" <sagig@mellanox.com>
Subject: RE: [RFC 0/7] Peer-direct memory
Date: Wed, 24 Feb 2016 23:45:12 +0000	[thread overview]
Message-ID: <36F6EBABA23FEF4391AF72944D228901EB712F72@BBYEXM01.pmc-sierra.internal> (raw)
In-Reply-To: <56C97E13.9090101@mellanox.com>

Haggi

> I'd be happy to see your RFC when you are ready. I see in the thread of [3]
> that you are using write-combining. Do you think your patchset will also be
> suitable for uncachable memory?

Great, we hope to have the RFC soon. It will be able to accept different flags for devm_memremap() call with regards to caching. Though one question I have is when does the caching flag affect Peer-2-Peer memory accesses? I can see caching causing issues when performing accesses from the CPU but P2P accesses should bypass any caches in the system?

> I don't think that's enough for our purposes. We have devices with rather
> small BARs (32MB) and multiple PFs that all need to expose their BAR to peer
> to peer access. One can expect these PFs will be assigned adjacent addresses
> and they will break the "one dev_pagemap per section" rule.

On the cards and systems I have checked even small BARs tend to be separated by more than one section's worth of memory.  As I understand it the allocation of BAR addresses is very ARCH and BIOS specific. Let's discuss this once the RFC comes out and see what options exist to address your concerns. 

> 
> > 4. The out of tree patch we did allows one to register the device memory as
> IO memory. However, we were only concerned with DRAM exposed on the
> BAR and so were not affected by the "i/o side effects" issues. Someone
> would need to think about how this applies to IOMEM that does have side-
> effects when accessed.
> With this RFC, we map parts of the HCA BAR that were mmapped to a
> process (both uncacheable and write-combining) and map them to a peer
> device (another HCA). As long as the kernel doesn't do anything else with
> these pages, and leaves them to be controlled by the user-space application
> and/or the peer device, I don't see a problem with mapping IO memory with
> side effects. However, I'm not an expert here, and I'd be happy to hear what
> others think about this.

See above. I think the upcoming RFC should provide support for both caching and uncashed mappings. I concur that even if the mappings are flagged as cachable there should be no issues as long as all accesses are from the peer-direct device.


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2016-02-24 23:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1455207177-11949-1-git-send-email-artemyko@mellanox.com>
     [not found] ` <20160211191838.GA23675@obsidianresearch.com>
2016-02-14 14:27   ` Haggai Eran
2016-02-16 18:22     ` Jason Gunthorpe
2016-02-17  4:03       ` davide rossetti
2016-02-17  4:13         ` davide rossetti
2016-02-17  4:44           ` Jason Gunthorpe
2016-02-17  8:49             ` Christoph Hellwig
2016-02-18 17:12               ` Jason Gunthorpe
2016-02-17  8:44           ` Christoph Hellwig
2016-02-17 15:25             ` Haggai Eran
2016-02-19 18:54               ` Dan Williams
     [not found]   ` <20160212201328.GA14122@infradead.org>
     [not found]     ` <20160212203649.GA10540@obsidianresearch.com>
     [not found]       ` <56C09C7E.4060808@dev.mellanox.co.il>
     [not found]         ` <36F6EBABA23FEF4391AF72944D228901EB70C102@BBYEXM01.pmc-sierra.internal>
2016-02-21  9:06           ` Haggai Eran
2016-02-24 23:45             ` Stephen Bates [this message]
2016-02-25 11:27               ` Haggai Eran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=36F6EBABA23FEF4391AF72944D228901EB712F72@BBYEXM01.pmc-sierra.internal \
    --to=stephen.bates@pmcs.com \
    --cc=artemyko@mellanox.com \
    --cc=dledford@redhat.com \
    --cc=haggaie@mellanox.com \
    --cc=hch@infradead.org \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=leonro@mellanox.com \
    --cc=linux-mm@kvack.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=logang@deltatee.com \
    --cc=sagig@dev.mellanox.co.il \
    --cc=sagig@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox