On Sunday 06 July 2008 13:58, Vladimir Dronnikov wrote:
> Yes. You see some kind of grepping of all modules is needed at
> startup, so why not to perform it explicitly? On my system it is about
> 20 modprobe calls with pci: aliases. The time to resolve them
> currently is an order of magnitude longer than just to cache the
> definitions once and then use the cache.

I propose the following:

modprobe tries to open modprobe.dep.bb and populates modinfo[]
array from there (see current code in svn). Otherwise,
it proceeds as it currently does.

When modprove enters alias searching loop, it tries to generate
new modprobe.dep.bb for the benefit of other mdprobes, since
it is going to scan all modules anyway. It creates
modprobe.dep.bb.new with O_EXCL. If that fails, other modprobe
is already doing that, so just wait for it to disappear
(other modprobe will rename it to modprobe.dep.bb)
and use modprobe.dep.bb.
Otherwise (modprobe.dep.bb.new created ok) generate it and rename
to modprobe.dep.bb.

Is this ok?
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to