Messages in this thread |  | | Date | Mon, 18 Jul 2011 23:36:02 -0400 | | From | Christoph Hellwig <> | | Subject | Re: [RFC][PATCH] Anonymous shared memory (ashmem) subsystem |
| |
On Mon, Jul 18, 2011 at 11:32:42PM -0400, Bryan Donlan wrote: > The pinning stuff seems like a reasonable idea to me, but why should > it be limited to ashmem using a private ioctl? If it were a proper > syscall, I could see automatic discarding being useful in on-disk > filesystems as well, for managing persistent caches.
Exactly.
> 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.
|  |