From: glebn@voltaire.com (Gleb Natapov)
To: Hugh Dickins <hugh@veritas.com>
Cc: "Michael S. Tsirkin" <mst@mellanox.co.il>,
Roland Dreier <roland@topspin.com>,
linux-kernel@vger.kernel.org, openib-general@openib.org
Subject: Re: [openib-general] Re: [PATCH repost] PROT_DONTCOPY: ifiniband uverbs fork support
Date: Wed, 10 Aug 2005 16:26:12 +0300 [thread overview]
Message-ID: <20050810132611.GP16361@minantech.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0508101412530.3153@goblin.wat.veritas.com>
On Wed, Aug 10, 2005 at 02:22:40PM +0100, Hugh Dickins wrote:
> On Wed, 10 Aug 2005, Gleb Natapov wrote:
> > On Tue, Aug 09, 2005 at 07:13:33PM +0100, Hugh Dickins wrote:
> > > Even more I'd prefer one of these two solutions below, which sidestep
> > > that uncleanliness - but both of these would be in mmap only, no clean
> > > way to change afterwards (except by munmap or mmap MAP_FIXED):
> > >
> > > 1. Use the standard mmap(NULL, len, PROT_READ|PROT_WRITE,
> > > MAP_SHARED|MAP_ANONYMOUS, -1, 0) which gives you a memory object
> > > shared with children, so write-protection and COW won't come into it.
> > >
> > > or if there's good reason why that's no good,
> > >
> > > 2. Define a MAP_DONTCOPY to mmap: we have a fine tradition of MAP_flags
> > > to achieve this or that effect, adding one more would be cleaner than
> > > now corrupting mprotect or madvise.
> >
> > They are both relying on the way user allocates memory for RDMA. The idea
> > behind Michael's propose it to let library (MPI for instance) to tell to the
> > kernel that the pages are used for RDMA and it is not safe to copy them now.
> > The pages may be anywhere in the process address space bss, text, stack
> > whatever.
>
> That's a nice aim, but I don't think it can quite be done in the face of
> the fork issue - one way or another, we have to change the behaviour of a
> forked RDMA area slightly, which might interfere with common assumptions.
>
> Your stack example is a good one: if we end up setting VM_DONTCOPY on
> the user stack, then I don't think fork's child will get very far without
> hitting a SIGSEGV.
I know, but I prefer child SIGSEGV than silent data corruption. In most
cases child will exec immediately after fork so no problem in this
case.
--
Gleb.
next prev parent reply other threads:[~2005-08-10 13:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-19 16:55 [PATCH] fork support Michael S. Tsirkin
2005-07-25 17:19 ` [PATCH repost] PROT_DONTCOPY: ifiniband uverbs " Michael S. Tsirkin
2005-07-26 12:30 ` Hugh Dickins
2005-07-26 13:35 ` Michael S. Tsirkin
2005-08-09 18:13 ` Hugh Dickins
2005-08-10 8:30 ` Michael S. Tsirkin
2005-08-10 8:39 ` [openib-general] " Gleb Natapov
2005-08-10 13:22 ` Hugh Dickins
2005-08-10 13:26 ` Gleb Natapov [this message]
2005-08-10 15:27 ` Hugh Dickins
2005-08-11 8:02 ` Gleb Natapov
2005-08-11 14:04 ` Hugh Dickins
2005-08-11 14:07 ` Gleb Natapov
2005-08-11 14:17 ` Hugh Dickins
2005-08-11 14:11 ` Michael S. Tsirkin
2005-08-15 16:37 ` Bill Jordan
2005-08-16 7:52 ` Gleb Natapov
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=20050810132611.GP16361@minantech.com \
--to=glebn@voltaire.com \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@mellanox.co.il \
--cc=openib-general@openib.org \
--cc=roland@topspin.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