Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Nov 2003 06:11:36 +0100
From:      des@des.no (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=)
To:        Tim Robbins <tjr@freebsd.org>
Cc:        current@freebsd.org
Subject:   Re: Port of Niels Provos's file descriptor allocation code
Message-ID:  <xzpr7zrwygn.fsf@dwp.des.no>
In-Reply-To: <xzp7k1j9avv.fsf@dwp.des.no> (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav's?= message of "Sat, 29 Nov 2003 03:17:08 %2B0100")
References:  <20031127070239.GA12950@wombat.robbins.dropbear.id.au> <xzpvfp4816m.fsf@dwp.des.no> <20031129011658.GA1347@wombat.robbins.dropbear.id.au> <xzp7k1j9avv.fsf@dwp.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
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
--=20
Dag-Erling Sm=F8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpr7zrwygn.fsf>