lkml.org 
[lkml]   [2011]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Approaches to making io_submit not block
On Thu, Sep 01, 2011 at 09:15:31AM -0700, Jeremy Allison wrote:
> > We could easily give you an fcntl / dup3 flag to only release posix
> > locks on the final close of a struct file if that helps you.
>
> That would help us enormously - it'd be Linux only of course but
> we could easily add support for that.
>
> Can you propose the design here so we can run it past some of the
> Solaris/FreeBSD folks (it'd be nice if we could get broader adoption) ?

Not sure there is all that much to discuss. The idea is to have locks
that behave like Posix locks, but only get release when the last duped
fd to them gets released.

We'd define a new O_LOCKS_WHATEVER flag for it, which gets set either
using fcntl(..., F_SETFL, ...) or dup3. All in all that should be less
than 50 lines of code in the kernel.

The alternative would be to design a different lock type, but that would
be a lot more invasive, and not provide any real benefits.



\
 
 \ /
  Last update: 2011-09-01 18:25    [W:0.055 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site