All of lore.kernel.org
 help / color / mirror / Atom feed
* build initramfs: explain modprobe?
@ 2011-08-30 22:48 John Reiser
       [not found] ` <4E5D68A0.8020006-Po6cBsTGB2ZWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: John Reiser @ 2011-08-30 22:48 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

What properties of modprobe are essential for building initramfs?
Modprobe works for only one kernel module at a time, and this is
a cause of slowness.  For instance, computing the transitive
closure of the Requires relationship over a non-small set of modules
can be performed faster by loading modules.dep into a bash associative
array, then processing in bash.  Also, modinfo now is invoked once per
module to find firmware, but this can be sped up by invoking on batches
of modules, using "split -C 32000" to avoid the argsize limit of execve.

Invoking modprobe with --ignore-install seems to remove any effects
due to (possibly host-specific) /etc/modules.d/*.conf.  Is there anything
else that modprobe does for building initramfs, other than transitive
closure of Requires?

-- 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: build initramfs: explain modprobe?
       [not found] ` <4E5D68A0.8020006-Po6cBsTGB2ZWk0Htik3J/w@public.gmane.org>
@ 2011-08-31 12:15   ` Harald Hoyer
       [not found]     ` <4E5E25DA.4060802-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Harald Hoyer @ 2011-08-31 12:15 UTC (permalink / raw)
  To: John Reiser; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

On 31.08.2011 00:48, John Reiser wrote:
> What properties of modprobe are essential for building initramfs?
> Modprobe works for only one kernel module at a time, and this is
> a cause of slowness.  For instance, computing the transitive
> closure of the Requires relationship over a non-small set of modules
> can be performed faster by loading modules.dep into a bash associative
> array, then processing in bash.  Also, modinfo now is invoked once per
> module to find firmware, but this can be sped up by invoking on batches
> of modules, using "split -C 32000" to avoid the argsize limit of execve.
>
> Invoking modprobe with --ignore-install seems to remove any effects
> due to (possibly host-specific) /etc/modules.d/*.conf.  Is there anything
> else that modprobe does for building initramfs, other than transitive
> closure of Requires?
>

Hmm, you are right. Modules loaded in "/etc/modules.d/*.conf" are not honored.
And yes, "modprobe" is only used to easily get the requirements.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: build initramfs: explain modprobe?
       [not found]     ` <4E5E25DA.4060802-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2011-09-06 15:34       ` John Reiser
  0 siblings, 0 replies; 3+ messages in thread
From: John Reiser @ 2011-09-06 15:34 UTC (permalink / raw)
  To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

>> What properties of modprobe are essential for building initramfs?
>> [snip]

> And yes, "modprobe" is only used to easily get the requirements.

Explicitly:
  0) Expand short names: "pcmcia" ==> "kernel/drivers/pcmcia/pcmcia.ko".
  1) Compute transitive closure of Requires from modules.dep.
  2) Ignore modules listed in modules.builtin.
  3) Handle aliasing of underscore and minus:
     "usb_storage" ==> "usb-storage".

-- 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-06 15:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-30 22:48 build initramfs: explain modprobe? John Reiser
     [not found] ` <4E5D68A0.8020006-Po6cBsTGB2ZWk0Htik3J/w@public.gmane.org>
2011-08-31 12:15   ` Harald Hoyer
     [not found]     ` <4E5E25DA.4060802-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-09-06 15:34       ` John Reiser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.