[PATCH 1/3] modprobe: use hash table for module entry database
Denys Vlasenko
vda.linux at googlemail.com
Sun Jun 19 00:39:46 UTC 2011
On Saturday 18 June 2011 17:56, Timo Teräs wrote:
> We get a lot of entries there, and lookups are done many, many
> times. This gives a significant performance improvement.
>
> Signed-off-by: Timo Teräs <timo.teras at iki.fi>
> ---
modutils/modprobe.c:174: error: size of array 'BUG_G_too_big' is negative
With it fixed, 1000 modprobes with non-existent module using
this script:
i=1000
while test $((--i)) != 0; do
$1 modprobe qwertyui
done
# time ./z ./busybox_old 2>/dev/null
real 0m5.532s
user 0m4.695s
sys 0m0.359s
# time ./z ./busybox 2>/dev/null
real 0m5.325s
user 0m4.673s
sys 0m0.375s
As you see, the win exists, but it's small.
--
vda
More information about the busybox
mailing list