[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1311089863.29817.172.camel@nimitz>
Date: Tue, 19 Jul 2011 08:37:43 -0700
From: Dave Hansen <dave@...ux.vnet.ibm.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: Bryan Donlan <bdonlan@...il.com>,
John Stultz <john.stultz@...aro.org>,
LKML <linux-kernel@...r.kernel.org>,
Robert Love <rlove@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Hugh Dickins <hughd@...gle.com>, Mel Gorman <mel@....ul.ie>,
Rik van Riel <riel@...hat.com>,
Eric Anholt <eric@...olt.net>,
Jesse Barnes <jbarnes@...tuousgeek.org>
Subject: Re: [RFC][PATCH] Anonymous shared memory (ashmem) subsystem
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists