Re: [RFC][PATCH] Anonymous shared memory (ashmem) subsystem

From: Bryan Donlan
Date: Mon Jul 18 2011 - 23:33:36 EST


On Mon, Jul 18, 2011 at 22:19, Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
> On Mon, Jul 18, 2011 at 11:54:34AM -0700, John Stultz wrote:
>> From: Robert Love <rlove@xxxxxxxxxx>
>>
>> Recently, Robert Love updated his ashmem patch and posted it here:
>>       http://www.kernel.org/pub/linux/kernel/people/rml/ashmem/
>>
>> This reminded me that in all the conversations around the Android patches,
>> I've not seen any discussion on lkml about the ashmem functionality.
>> Coming from Robert, its very clean and self-contained and seems pretty
>> interesting. So I wanted to send it out for review and comments.
>
> And utterly stupid, just use tmpfs and /dev/zero for the base functionality.
>
> And the pinning crap really needs a much better rationale.

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. 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/