lkml.org 
[lkml]   [2009]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH, RFC] Remove fasync() BKL usage, take 3325
On Wed, 28 Jan 2009 12:13:47 -0600
Matt Mackall <mpm@selenic.com> wrote:

> Maybe we can just demote f_ep_lock to f_lock and share it?

We'd have to move it out of the CONFIG_EPOLL ifdef, but that could be
done. The bigger problem is that there is resistance to putting a lock
around accesses to f_flags. I've tried that before...

It also doesn't solve the FASYNC atomicity problem unless we decide to
call ->fasync() with the lock held, and that opens yet another can of
worms.

> Or extend flags and have two independent bitlocks in it. This actually
> shrinks struct_file for most users.

That has some potential. We'd only need one bitlock (for epoll).
Biggest problem might be preventing the regular file flags from
expanding into the lock bit, especially since those flags are defined
in a pile of architecture-dependent .h files. I'll look into it.

(That's somebody's cue to tell me why this approach is all wrong
too...:)

Thanks,

jon


\
 
 \ /
  Last update: 2009-01-28 22:09    [W:0.045 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site