Significant performance problem with modprobe

Timo Teräs timo.teras at iki.fi
Tue Jun 14 14:17:46 UTC 2011


On 06/14/2011 05:06 PM, Lauri Kasanen wrote:
> Hi
> 
> I replaced bb modprobe with the latest module-init-tools one (3.16) and
> ran the mod-init-tools depmod (to generate the .bin files).
> Rather curiously, doing that dropped 28% off the boot time ;) Consider
> this issue confirmed.
> 
> I then removed the .bin files, to test the full modprobe with the same
> alias files as bb. The boot was still 23% faster than with bb modprobe.
> 
> Bootchart 1, module-init-tools + bin:
> http://www.shareapic.net/Zoom-25083078-TC.html
> Bootchart 2, module-init-tools:
> http://www.shareapic.net/Zoom-25083079-TC.html
> 
> So there's obviously something else besides the bin files going on. I
> guess I'll record all the calls to modprobe, to get a test set.

Could you try changing busybox to use getc_unlocked? I suspect you have
thread capable libc/uclibc and they are doing a lot of locking. Locking
is cpu-wise expensive operation. Especially in this case as the lock is
reacquired for *every character* in the dependency file.

That's only thing I can think of what could be going differently.

And this would be issue in the config_* function on libbb. And causing
performance issues in multiple other places too.


More information about the busybox mailing list