modprobe patches

Denys Vlasenko vda.linux at googlemail.com
Thu Mar 5 16:32:09 UTC 2009


On Thursday 05 March 2009 02:26:31 pm Timo Teräs wrote:
> Denys Vlasenko wrote:
> >> - other for the speed up stuff, for trunk
> > 
> >> The speed up probably increases size a bit, but I think it's worth it.
> >> Comments, appreciated.
> > 
> > Second patch looks interesting too, but does not apply cleanly to trunk
> > (and does not apply to 1.13.0). Which revision is it against?
> > (If you can please rediff against current svn).
> 
> It was against relatively recent trunk. Apparently you tweaked some of
> the modprobe error message not too long ago, which resulted in the
> conflicts.
> 
> Attached is a rebased patch. Did some trivial tests.

"struct modprobe_conf" seems to be a classic set of globals.
By using usual "struct globals" trick we can avoid passing around
struct modprobe_conf* pointer with the following results
relative to unpatched tree:

function                                             old     new   delta
load_modules_dep                                       -     175    +175
helper_get_module                                      -     106    +106
gather_options                                         -      89     +89
add_probe                                              -      67     +67
config_file_action                                   345     388     +43
get_or_add_modentry                                    -      10     +10
loaded                                                 4       -      -4
read_config                                          239     234      -5
llist_find                                            34       -     -34
add_option                                            60       -     -60
modprobe_main                                        567     494     -73
do_modprobe                                          601     273    -328
------------------------------------------------------------------------------
(add/remove: 5/3 grow/shrink: 1/3 up/down: 490/-504)          Total: -14 bytes
   text    data     bss     dec     hex filename
 816778     476    7888  825142   c9736 busybox_old
 816768     476    7880  825124   c9724 busybox_unstripped


I also renamed a few fields and variables here and there, added comments.
Please review/test current svn. The // comments are TODOs.

For easy reference new modprobe.c is attached.
--
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: modprobe.c
Type: text/x-csrc
Size: 9831 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20090305/d0bd893f/attachment-0001.c>


More information about the busybox mailing list