From: Ingo Molnar <mingo@elte.hu>
To: Avi Kivity <avi@redhat.com>
Cc: Christopher Yeoh <cyeoh@au1.ibm.com>,
linux-kernel@vger.kernel.org,
Linux Memory Management List <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [RFC][PATCH] Cross Memory Attach
Date: Wed, 15 Sep 2010 15:51:55 +0200 [thread overview]
Message-ID: <20100915135155.GA25210@elte.hu> (raw)
In-Reply-To: <4C90A6C7.9050607@redhat.com>
* Avi Kivity <avi@redhat.com> wrote:
> On 09/15/2010 03:18 AM, Christopher Yeoh wrote:
>
> > The basic idea behind cross memory attach is to allow MPI programs
> > doing intra-node communication to do a single copy of the message
> > rather than a double copy of the message via shared memory.
>
> If the host has a dma engine (many modern ones do) you can reduce this
> to zero copies (at least, zero processor copies).
>
> > The following patch attempts to achieve this by allowing a
> > destination process, given an address and size from a source
> > process, to copy memory directly from the source process into its
> > own address space via a system call. There is also a symmetrical
> > ability to copy from the current process's address space into a
> > destination process's address space.
>
> Instead of those two syscalls, how about a vmfd(pid_t pid, ulong
> start, ulong len) system call which returns an file descriptor that
> represents a portion of the process address space. You can then use
> preadv() and pwritev() to copy memory, and io_submit(IO_CMD_PREADV)
> and io_submit(IO_CMD_PWRITEV) for asynchronous variants (especially
> useful with a dma engine, since that adds latency).
>
> With some care (and use of mmu_notifiers) you can even mmap() your
> vmfd and access remote process memory directly.
>
> A nice property of file descriptors is that you can pass them around
> securely via SCM_RIGHTS. So a process can create a window into its
> address space and pass it to other processes.
>
> (or you could just use a shared memory object and pass it around)
Interesting, but how will that work in a scalable way with lots of
non-thread tasks?
Say we have 100 processes. We'd have to have 100 fd's - each has to be
passed to a new worker process.
In that sense a PID is just as good of a reference as an fd - it can be
looked up lockless, etc. - but has the added advantage that it can be
passed along just by number.
Thanks,
Ingo
--
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>
next prev parent reply other threads:[~2010-09-15 13:52 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 [this message]
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
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=20100915135155.GA25210@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=avi@redhat.com \
--cc=cyeoh@au1.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--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).