linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Robin Holt <holt@sgi.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Christopher Yeoh <cyeoh@au1.ibm.com>, Avi Kivity <avi@redhat.com>,
	linux-kernel@vger.kernel.org,
	Linux Memory Management List <linux-mm@kvack.org>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: [RFC][PATCH] Cross Memory Attach
Date: Wed, 15 Sep 2010 10:44:58 -0500	[thread overview]
Message-ID: <20100915154458.GE3013@sgi.com> (raw)
In-Reply-To: <AANLkTikkAs5jUPhsq5=_Efv-MbbfCNmT10rcV6VUc54D@mail.gmail.com>

> > 3. ability to map part of another process's address space directly into
> >   the current one. Would have setup/tear down overhead, but this would
> >   be useful specifically for reduction operations where we don't even
> >   need to really copy the data once at all, but use it directly in
> >   arithmetic/logical operations on the receiver.
> 
> Don't even think about this. If you want to map another tasks memory,
> use shared memory. The shared memory code knows about that. The races
> for anything else are crazy.

SGI has a similar, but significantly more difficult, problem to solve and
have written a fairly complex driver to handle exactly the scenario IBM
is proposing.  In our case, not only are we trying to directly access one
processes memory, we are doing it from a completely different operating
system instance operating on the same numa fabric.

In our case (I have not looked at IBMs patch), we are actually using
get_user_pages() to get extra references on struct pages.  We are
judicious about reference counting the mm and we use get_task_mm in all
places with the exception of process teardown (ignorable detail for now).
We have a fault handler inserting PFNs as appropriate.  You can guess
at the complexity.  Even with all its complexity, we still need to
caveat certain functionality as not being supported.

If we were to try and get that driver included in the kernel, how would
you suggest we expand the shared memory code to include support for the
coordination needed between those seperate operating system instances?
I am genuinely interested and not trying to be argumentative.  This has
been on my "Get done before Aug-1 list for months and I have not had
any time to pursue.

Thanks,
Robin

--
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:[~2010-09-15 15:45 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100915104855.41de3ebf@lilo>
2010-09-15  8:02 ` [RFC][PATCH] Cross Memory Attach Ingo Molnar
2010-09-15  8:16   ` Ingo Molnar
2010-09-15 13:23     ` Christopher Yeoh
2010-09-15 13:20   ` Christopher Yeoh
2010-09-15 10:58 ` Avi Kivity
2010-09-15 13:51   ` Ingo Molnar
2010-09-15 16:10     ` Avi Kivity
2010-09-15 14:42   ` Christopher Yeoh
2010-09-15 14:52     ` Linus Torvalds
2010-09-15 15:44       ` Robin Holt [this message]
2010-09-16  6:32     ` Brice Goglin
2010-09-16  9:15       ` Brice Goglin
2010-09-16 14:00         ` Christopher Yeoh
2010-09-15 14:46   ` Bryan Donlan
2010-09-15 16:13     ` Avi Kivity
2010-09-15 19:35       ` Eric W. Biederman
2010-09-16  1:18     ` Christopher Yeoh
2010-09-16  9:26       ` Avi Kivity
2010-11-02  3:37         ` Christopher Yeoh
2010-11-02 11:10           ` Avi Kivity
2010-09-16  1:58     ` KOSAKI Motohiro
2010-09-16  8:08       ` Ingo Molnar

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=20100915154458.GE3013@sgi.com \
    --to=holt@sgi.com \
    --cc=avi@redhat.com \
    --cc=cyeoh@au1.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@linux-foundation.org \
    /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).