?????: modprobe woes

Denys Vlasenko vda.linux at googlemail.com
Wed Aug 6 09:44:02 UTC 2008


On Wed, Aug 6, 2008 at 8:51 AM, Timo Teräs <timo.teras at iki.fi> wrote:
> Timo Teräs wrote:
>> The results of busybox-vladimir are not comparable, because my
>> /lib/modules is on read-only media. I did recompile it to use
>> /etc for modules.dep.bb, and it created the file, but is still
>> trying to generate it (modprobe-small has been using 99% of the
>> CPU for past several minutes; will report back if it ever finishes).
>> Curiously it did work okay, when it could not create the dep file.
>
> Got tired of waiting, compiled debug version and gdb:ed.
> And found a bug in modprobe-small. Use the following to fix it:
>
> Index: modutils/modprobe-small.c
> ===================================================================
> --- modutils/modprobe-small.c   (revision 23058)
> +++ modutils/modprobe-small.c   (working copy)
> @@ -444,8 +444,10 @@
>                if (!modinfo[i].aliases) {
>                        parse_module(&modinfo[i], modinfo[i].pathname);
>                }
> -               if (result)
> +               if (result) {
> +                       i++;
>                        continue;
> +               }
>                /* "alias1 symbol:sym1 alias2 symbol:sym2" */
>                desc = str_2_list(modinfo[i].aliases);
>                /* Does matching substring exist? */

Applied, thanks!

> So the profile of modprobe-small with module.dep.bb created:
> ~ # time ./busybox-vladimir modprobe aes
> real    0m 0.07s
> user    0m 0.06s
> sys     0m 0.01s
>
> Profile with debug symbols:
> 21,236,623  PROGRAM TOTALS
> 13,056,719  get_line_from_file.c:bb_get_chunk_from_file [/root/busybox-vladimir]

This routine uses fgetc in a loop. I just want to remind again -
if you speed it up, do run full testsuite and fix regressions...

> 1,280,482  ???:malloc [/lib/libuClibc-0.9.28.so]

--
vda



More information about the busybox mailing list