Re: [patchset] Lockfree fd lookup 0 of 5

viro
2004-08-03T10:09:33Z

On Tue, Aug 03, 2004 at 02:53:17PM +0530, Ravikiran G Thirumalai wrote:
> > How about this for comparison? That's just a dumb "convert to rwlock"
> > patch; we can be smarter in e.g. close_on_exec handling, but that's a
> > separate story.
> >
>
> I ran tiobench on this patch and here is the comparison:
>
>
> Kernel Seqread Randread Seqwrite Randwrite
> --------------------------------------------------------------------------
> 2.6.7 410.33 234.15 254.39 189.36
> rwlocks-viro 401.84 232.69 254.09 194.62
> refcount (kref) 455.72 281.75 272.87 230.10

Thanks. IOW, we are really seeing cacheline bounces - not contention...

I'm still not sure that in the current form patch is a good idea. The thing
is, existing checks for ->f_count value are bogus in practically all cases;
IMO we should sort that out before making any decision based on the need for
such checks. Ditto for uses of fcheck() (open-coded or not) in arch/*.

I agree that some form of "postpone freeing and make fget() lockless" would
make sense, but I'd rather clean the area *before* doing that; afterwards it
will be harder and results of cleanup can affect the patches in non-trivial
way.