lkml.org 
[lkml]   [2013]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [BUG] staging: android: ashmem: Deadlock during ashmem_shrink
From
On Mon, Apr 22, 2013 at 10:22 AM, Dan Carpenter
<dan.carpenter@oracle.com> wrote:
> Read Al's email again: https://lkml.org/lkml/2013/3/20/458
>
> I don't know much about VFS locking, but the ashmem locking seems
> pretty bogus to me. Why can't multiple threads read() at the same
> time?

ashmem originally did not support read or write operations, just mmap,
which is all 99% of users want. The original concurrency model with
per-mapping ashmem_mutex's works fine there. It is only with the later
addition of read and write that locking becomes a cluster. If there
isn't an obvious way to refactor the locking, I'd suggest removing
read and write.

Robert


\
 
 \ /
  Last update: 2013-04-22 18:21    [W:0.077 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site