lkml.org 
[lkml]   [2011]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.


\
 
 \ /
  Last update: 2011-07-19 05:39    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog