[PATCH]: fdalloc optimization
Divacky Roman
xdivac02 at stud.fit.vutbr.cz
Mon Aug 22 08:33:25 GMT 2005
On Mon, Aug 22, 2005 at 10:49:32AM +0300, Giorgos Keramidas wrote:
> On 2005-08-22 09:40, Divacky Roman <xdivac02 at stud.fit.vutbr.cz> wrote:
> >On Sun, Aug 21, 2005 at 01:54:06PM -0400, Kris Kennaway wrote:
> >>On Sun, Aug 21, 2005 at 10:45:46AM +0200, Divacky Roman wrote:
> >>> I made a patch for fdalloc which could speed it up a bit, its stored under
> >>> kern/85176 or http://hysteria.sk/~neologism/kern_descrip.patch
> >>
> >> That's all nice and everything, but *does* it speed it up a bit? :-)
> >
> > ie. its never slower but I think this is insignificant. on the other hand -
> > buildkernel is not that fdalloc sensitive. dont know how to measure it ;(
>
> By running an application that opens (and keeps open) many files, i.e.
> a program that creates many temporary files, keeps them open and then
> closes them all at once before exiting?
I did:
gettimeofday(&t1, NULL);
for (; i>0; i--) {
if (open("/dev/null", O_RDONLY) == -1) {
perror(NULL);
break;
}
}
gettimeofday(&t2, NULL);
tested by:
#!/bin/csh
set i=100;
while ($i > 0)
@ i--
rtprio 10 ./a.out
end
and ministat showed:
x /tmp/old_kernel
+ /tmp/new_kernel
+--------------------------------------------------------------------------+
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| +x |
| *x |
| *x |
| *x |
| *x |
| *x |
| *x |
| *x |
| *x |
| *x |
| *x |
| *x |
| *x |
| *x |
| *x |
| *x |
| *x |
| *x |
| *x |
| *x |
| *x |
| *x |
| *x x|
| *x x|
| *x *|
| *x *|
| *x *|
|||________MMA_A________|___| |
+--------------------------------------------------------------------------+
N Min Max Median Avg Stddev
x 100 39957 959570 41444 87169.69 201011.84
+ 100 37786 962107 38766 66353.09 158258.74
No difference proven at 95.0% confidence
anyway - commenting out duplicate code MUST speed it up, maybe insignificantly
but still ;)
roman
More information about the freebsd-current
mailing list