lkml.org 
[lkml]   [2012]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] [RFC] ashmem: Convert ashmem to use volatile ranges
On 04/24/2012 12:21 PM, Peter Zijlstra wrote:
> On Tue, 2012-04-24 at 10:49 -0700, John Stultz wrote:
>> First pass attempt at getting ashmem to utilize the volatile range
>> code.
> One would think the purpose of the previous patches was to entirely do
> away with the ashmem interface.. this patch is a temporary band-aid to
> assist in testing without having to modify userspace?
>
So in a way, yes. I'm trying to iteratively chip away at the staging
drivers, providing a smooth transition path. This patch is just to show
(or determine, depending on if the GET_PIN_STATUS is critical) that the
fadvise volatile functionality is sufficient to replace the ashmem
unpinning feature.

Part of the trouble with pushing the Android drivers upstream is that
each driver doesn't just solve one issue, but usually handles a number
of problems. Thus discussion about alternative solutions gets muddled as
no one alternative is sufficient.

For the ashmem driver, one big use case is a way to provide fds to
anonymous memory that can be shared between processes. This is the same
as an unlinked tmpfs file, but allows them to not have tmpfs mounts,
which could potentially be cluttered with poorly written or malicious
applications. There is also the feature of being able to unpin memory
ranges of that fd, which I thought was interesting for wider use.

The fadivse volatile work provides that unpinning feature, but doesn't
do anything to try to provide atomically unlinked tmpfs fds. To solve
that problem, we'll have to revisit if the simplified ashmem interface
makes sense, or if there should be something like a permissions based
userspace solution with a deamon that does the create/unlink and hands
the fds out. But hopefully that discussion will be more clear, as it
will be only about one feature.

thanks
-john



\
 
 \ /
  Last update: 2012-04-24 21:49    [W:0.033 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site