Re: [Fwd: Recommendation for activating a deferred module init in the kernel]

From: Pavel Machek
Date: Mon Jun 23 2008 - 10:20:35 EST


Hi!

> In our modification, we:
> 1) add another phase for deferred initcalls
> 2) modify the module_init macro definition to use that phase, for the
> modules we wish to defer initialization of
> 3) modify the free code to not free the memory until later
> 4) add an ioctl to trigger the deferred initialization (and memory free)
>
> One of the main sub-systems that we defer initialization of this
> way is USB, and this saves quite a bit of time. (Of course the
> same, or slightly more CPU cycles are eventually used during
> bootup time. But this lets us get to user space quicker so we
> can start user-visible applications faster.)

Could the usb be modified to do background init by default, instead?

> I'm not that happy using an ioctl for this trigger. What is
> the preferred method of activating a kernel feature like this?
> I presume something in /proc or /sys, but I'm not sure.

Definitely not /proc.

Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/