William Cohen wrote:
One of the thing that became
apparent was the amount of data read from /lib/modules/`uname
-r`/modules.dep and the time reading the data. modprobe is not smart
at all about reading the file; it just does a linear search and stops
when it finds the first matching entry.
Wouldn't it make sense to place the modules that are actually loaded
at the beginning of the modules.dep to reduce the amount of data read
by modprobe?
I wrote a simple script to examine the modules loaded and put the
entries in modules.dep at the beginning of the file. I then replaced
the modules.dep with this modified version. I compared the data
collected with bootchart. The boot is a couple seconds faster for the
modified version (1:05 vs 1:07) on AMD64 rawhide machine.
This is interesting. I'm not sure if there are embedded
developers using modprobe (you never know), but it still seems
interesting (both the immediate results and the technique)
for embedded folk. Do you mind if I forward this to the
celinux-dev mailing list?
-- Tim
=============================
Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Electronics
=============================