From: Dave Hansen <dave@linux.vnet.ibm.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Bryan Donlan <bdonlan@gmail.com>,
John Stultz <john.stultz@linaro.org>,
LKML <linux-kernel@vger.kernel.org>,
Robert Love <rlove@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Hugh Dickins <hughd@google.com>, Mel Gorman <mel@csn.ul.ie>,
Rik van Riel <riel@redhat.com>, Eric Anholt <eric@anholt.net>,
Jesse Barnes <jbarnes@virtuousgeek.org>
Subject: Re: [RFC][PATCH] Anonymous shared memory (ashmem) subsystem
Date: Tue, 19 Jul 2011 08:37:43 -0700 [thread overview]
Message-ID: <1311089863.29817.172.camel@nimitz> (raw)
In-Reply-To: <20110719033602.GA4867@infradead.org>
On Mon, 2011-07-18 at 23:36 -0400, Christoph Hellwig wrote:
> > But yes, tmpfs
> > already solved the problem of getting a shared-memory file descriptor
> > - just open a random-name file in tmpfs, unlink it, and start passing
> > it around.
>
> Indeed. And as mentioned before using /dev/zero as the file will
> get you a pre-unlinked tmpfs fd without any races, and without the
> need of actually mounting shmem into any namespace.
"Why not use tmpfs?" was my gut reaction, too. The patch is named a bit
unfortunately, but I think the key bit in them is the "volatile" pages,
not the "anonymous" or "shared memory" features.
Those let userspace allocate things like caches, and lets the kernel
destructively (but safely) reclaim them when there's memory pressure
(implemented as a slab shrinker here). It's kinda like a kernel-driven
garbage collector, or even like a distant relative of those CMM2 patches
from the s390 folks a few years ago.
This implementation has some real show-stopper things in it, like its
own LRU. But, the concept seems interesting at least.
-- Dave
next prev parent reply other threads:[~2011-07-19 15:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-18 18:54 [RFC][PATCH] Anonymous shared memory (ashmem) subsystem John Stultz
2011-07-19 2:19 ` Christoph Hellwig
2011-07-19 3:32 ` Bryan Donlan
2011-07-19 3:36 ` Christoph Hellwig
2011-07-19 15:37 ` Dave Hansen [this message]
2011-07-19 15:41 ` Christoph Hellwig
2011-07-19 21:58 ` John Stultz
2011-07-19 14:33 ` Christoph Lameter
2011-07-19 15:55 ` Arnd Bergmann
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=1311089863.29817.172.camel@nimitz \
--to=dave@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=bdonlan@gmail.com \
--cc=eric@anholt.net \
--cc=hch@infradead.org \
--cc=hughd@google.com \
--cc=jbarnes@virtuousgeek.org \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mel@csn.ul.ie \
--cc=riel@redhat.com \
--cc=rlove@google.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