lkml.org 
[lkml]   [2009]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC][PATCH 0/9] File descriptor hot-unplug support
Al Viro <viro@ZenIV.linux.org.uk> writes:

> On Sat, Apr 11, 2009 at 09:49:36AM -0700, Eric W. Biederman wrote:
>
>> The fact that in the common case only one task ever accesses a struct
>> file leaves a lot of room for optimization.
>
> I'm not at all sure that it's a good assumption; even leaving aside e.g.
> several tasks sharing stdout/stderr, a bunch of datagrams coming out of
> several threads over the same socket is quite possible.

I have thought about this a little more and a solution to ensure this is
not a problem for code that has not opted in to this new functionality is
simple. Require uses that need it to set FMODE_REVOKE.

It is no extra code and it keeps the absolute worst case behavior for
existing code down an additional branch mispredict.

It is worth doing anyway because it cleans up the abstraction and makes
it clear where revoke is supported.

Eric


\
 
 \ /
  Last update: 2009-04-12 22:25    [W:0.703 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site