Re: Port of Niels Provos's file descriptor allocation code

From: Dag-Erling Smørgrav <des_at_des.no>
Date: Sat, 29 Nov 2003 06:11:36 +0100
I've run some benchmarks of my own with and without the patch, and
it's a definite improvement...  I expected it to go linear for large
number of open file descriptors, and it does, but the slope is much
less steep than I expected, which explains why it looked like O(1).

I have two objections to the patch, however: the first is the use of
NDENTRYSHIFT to obfuscate multiplications and divisions by NDENTRIES
(which is a constant, so the compiler will optimize it anyway).  The
second is the use of uint32_t instead of unsigned long which should be
more efficient on 64-bit machines (NDENTRIES would have to be made
dependent on sizeof(unsigned long))

and it scares me a bit that the Banga & Mogul paper has been floating
around for five years and nobody took any notice...

DES
-- 
Dag-Erling Smørgrav - des_at_des.no
Received on Fri Nov 28 2003 - 20:11:45 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:31 UTC