<p dir="ltr"><br>
On 16 Dec 2014 17:21, "Umut Tezduyar Lindskog" <<a href="mailto:umut@tezduyar.com">umut@tezduyar.com</a>> wrote:<br>
><br>
> On Tue, Dec 16, 2014 at 4:59 PM, Tom Gundersen <<a href="mailto:teg@jklm.no">teg@jklm.no</a>> wrote:<br>
> > On Tue, Dec 16, 2014 at 4:54 PM, Umut Tezduyar Lindskog<br>
> > <<a href="mailto:umut@tezduyar.com">umut@tezduyar.com</a>> wrote:<br>
> >> The other thought is, what is the preferred way of loading modules<br>
> >> when they are needed.<br>
> ><br>
> > Rely on kernel autoloading. Not all modules support that yet, but most<br>
> > do. What do you have in mind?<br>
><br>
> We have some modules that we don't need them to be loaded so early. We<br>
> much prefer them to be loaded when they are needed. For example we<br>
> don't need to load the SD driver module until the service that uses SD<br>
> driver is starting. With this idea in mind I started some<br>
> investigation. Then I realized that our CPU utilization is not that<br>
> high during module loading and I blame it to the sequential loading of<br>
> modules. I am thinking this can be improved on systemd-modules-load<br>
> side.</p>
<p dir="ltr">We can probably improve the module loading by making it use worker processes similar to how udev works. In principle this could cause problems with things making assumptions on the order of module loading, so that is something to keep in mind. That said, note that most modules will be loaded by udev which already does it in parallel...</p>
<p dir="ltr">> >> Do they have to be loaded on ExecStartPre= or as<br>
> >> a separate service which has ExecStart that uses kmod to load them?<br>
> >> Wouldn't it be useful to have something like ExecStartModule=?<br>
> ><br>
> > I'd much rather we improve the autoloading support...<br>
><br>
> My understanding is autoloading support is loading a module if the<br>
> hardware is available.</p>
<p dir="ltr">That, or for non-hardware modules when the functionally is first used (networking, filesystems, ...).</p>
<p dir="ltr">> What I am after is though loading the module<br>
> when they are needed.</p>
<p dir="ltr">This sounds really fragile to me (having to encode this dependency everywhere rather than just always assume the functionality is available).</p>
<p dir="ltr">Cheers,</p>
<p dir="ltr">Tom</p>