This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: modprobe slow linear search of /lib/modules/`uname -r`/modules.deps


Tim Bird wrote:
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
=============================


Go ahead and forward the information to the celinux-dev mailing list. I am not sure if the particular data would be applicable to it. I hope that embedded systems don't have 270K worth of modules.dep. :)


I posted some mail "Boot-time probing with SystemTap" describing some of the experiences with bootchart and what things might do to simplify the use of systemtap in similar areas.

-Will


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]