Re: "Read my lips: no more merges" - aka Linux 2.6.14-rc1

Eric Dumazet
2005-09-13T07:04:48Z

Sonny Rao a écrit :
> On Mon, Sep 12, 2005 at 08:34:17PM -0700, Linus Torvalds wrote:
> <snip>
>
>>On the filesystem level, FUSE got merged, and ntfs and xfs got updated. In
>>the core VFS layer, the "struct files" thing is now handled with RCU and
>>has less expensive locking.
>
>
> I hope this means that people will be more accepting of multi-threaded
> benchmarks (who needs real apps... ;-)) which do open() and close().
>
>
> Yes, no?

If you look at RCU change, you discover they impact read()/write()/... (no
more locking), but not open()/dup()/socket() and close() that still take a
spinlock to modify the state.

And if your process has many files opened, the cost (read : latency) of open()
can be very high, finding a zero bit in a large bit array.

So these RCU changes can help some benchmarks (or real apps... ;-) ), but not
some others :)

I wish a process param could allow open() to take any free fd available, not
the lowest one. One can always use fcntl(fd, F_DUPFD, slot) to move a fd on a
specific high slot and always keep the 64 first fd slots free to speedup the
kernel part at open()/dup()/socket() time.