From: "Michael S. Tsirkin" <mst@redhat.com>
To: Roland Dreier <roland@kernel.org>
Cc: qemu-devel@nongnu.org,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
Yishai Hadas <yishaih@mellanox.com>,
LKML <linux-kernel@vger.kernel.org>,
"Michael R. Hines" <mrhines@linux.vnet.ibm.com>,
Hal Rosenstock <hal.rosenstock@gmail.com>,
Sean Hefty <sean.hefty@intel.com>,
Christoph Lameter <cl@linux.com>
Subject: Re: [Qemu-devel] [PATCH] rdma: don't make pages writeable if not requiested
Date: Thu, 21 Mar 2013 10:51:07 +0200 [thread overview]
Message-ID: <20130321085107.GE28328@redhat.com> (raw)
In-Reply-To: <CAG4TOxPkhOhGmzeA1K4a0Zw8HxS-QkOr-PCx7mJgA+KkuH3ZiQ@mail.gmail.com>
On Thu, Mar 21, 2013 at 12:15:33AM -0700, Roland Dreier wrote:
> >> I think this change will break the case where userspace tries to
> >> register an MR with read-only permission, but intends locally through
> >> the CPU to write to the memory.
>
> > Shouldn't it set LOCAL_WRITE then?
>
> We're talking about the permissions for the register MR operation,
> right? (That's what the kernel RDMA driver code that does
> get_user_pages() sees)
>
> In that case, no, I don't see any reason for LOCAL_WRITE, since the
> only RDMA operations that will access this memory are remote reads.
What is the meaning of LOCAL_WRITE then? There are no local
RDMA writes as far as I can see.
> The writing (that triggers COW) is coming from normal process access
> triggering a page fault, etc. This is a pretty standard way of using
> RDMA... For example, I allocate some memory and register it for RDMA
> read (and pass the R_Key to the remote system) with only REMOTE_READ
> permission. Then I fill in the memory with the results of some
> computation and the remote system does an RDMA read to get those
> results.
>
> - R.
OK then what we need is a new flag saying "I really do not
intend to write into this memory please do not break
COW or do anything else just in case I do".
--
MST
next prev parent reply other threads:[~2013-03-21 8:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-21 6:18 [Qemu-devel] [PATCH] rdma: don't make pages writeable if not requiested Michael S. Tsirkin
2013-03-21 6:55 ` Roland Dreier
2013-03-21 7:03 ` Michael S. Tsirkin
2013-03-21 7:15 ` Roland Dreier
2013-03-21 8:51 ` Michael S. Tsirkin [this message]
2013-03-21 9:13 ` Roland Dreier
2013-03-21 9:39 ` Michael S. Tsirkin
2013-03-21 17:11 ` Jason Gunthorpe
2013-03-21 17:15 ` Michael S. Tsirkin
2013-03-21 17:21 ` Jason Gunthorpe
2013-03-21 17:42 ` Michael S. Tsirkin
2013-03-21 17:57 ` Jason Gunthorpe
2013-03-21 18:03 ` Michael S. Tsirkin
2013-03-21 18:16 ` Michael S. Tsirkin
2013-03-21 18:41 ` Jason Gunthorpe
2013-03-21 19:15 ` Michael S. Tsirkin
2013-03-21 20:09 ` Jason Gunthorpe
2013-03-21 9:32 ` Michael S. Tsirkin
2013-03-21 11:30 ` Michael S. Tsirkin
2013-03-21 12:23 ` Michael R. Hines
2013-03-21 12:32 ` Michael S. Tsirkin
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=20130321085107.GE28328@redhat.com \
--to=mst@redhat.com \
--cc=cl@linux.com \
--cc=hal.rosenstock@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mrhines@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=roland@kernel.org \
--cc=sean.hefty@intel.com \
--cc=yishaih@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;
as well as URLs for NNTP newsgroup(s).