[PATCH] Speed up modprobe and MAKEDEV

Jakub Jelinek jakub at redhat.com
Thu Oct 2 11:37:50 UTC 2008


On Thu, Oct 02, 2008 at 05:06:30AM +0200, Bernie Innocenti wrote:
> Kyle McMartin wrote:
>> Ah, I'm glad to see others working on this! I'd not seen the Mandriva
>> efforts, but I should really poke at them as I'd turned modprobe into
>> a library and started integrating it into udev.
>
> What an un-unixish design!
>
> One could achieve the same performance with a trivial change that would  
> keep modprobe and udev independent and simple:
>
>   cat | modprobe --stdin
>   radeon
>   drm
>   foo
>   FATAL: Module foo not found.
>   e1000
>   ^D
>
> Well, you get the idea... :-)

The way modprobe is written, just changing it to a library or handling
multiple requests from one command doesn't help much, as for every argument
modprobe reads all config files again anyway and for alias handling the most
costly is the search among the aliases anyway and searching the deps is
somewhat costly too.  Reading the config files just once is of course fixable
(both in the library and --stdin models) but the searching would still be
an issue.  Either modprobe can create the hash tables or search tree for
aliases on the fly, or, what I've done in my patch, let depmod create it
ahead of time and modprobe just use it.

	Jakub




More information about the fedora-devel-list mailing list