Port of Niels Provos's file descriptor allocation code
tjr at freebsd.org
Fri Nov 28 17:13:17 PST 2003
On Sat, Nov 29, 2003 at 01:32:01AM +0100, Dag-Erling Sm?rgrav wrote:
> Tim Robbins <tjr at freebsd.org> writes:
> > I've ported Niels Provos's file descriptor allocation code to FreeBSD
> > in case anyone wants to try it out & run some benchmarks. If the performance
> > boost turns out to be worth the added complexity, I might clean it up a
> > bit and commit it.
> What exactly would be the point? If this is the OpenBSD fdalloc code,
> recent widely-publicized benchmarks have shown it to be inferior to
> ours. Perhaps you should concentrate on improving vm_map_find() and
> vm_map_findspace() performance instead?
It's also the NetBSD fdalloc code. They started with code similar to ours,
in that it did a linear search of the file descriptor array to find an
empty slot and used hints to speed up some common allocation patterns,
then recently switched over to using the multi-level bitmap allocator.
I can't think of any reason why we wouldn't see improvements similar to
what they saw:
... but I'm still working on benchmarking FreeBSD with & without the new
allocator; I just posted the patch so that other people could experiment
with it if they were interested. I don't plan on committing it until
I have good evidence that it's an improvement over the current code.
More information about the freebsd-current