tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Boot time loaded module auto-unload [Was: Re: CVS commit: src/sys/kern]



On Sun, Dec 28, 2008 at 02:27:17PM -0500, Arnaud Lacombe wrote:

> [moving this thread to tech-kern@]
> 
> On Sun, Dec 28, 2008 at 9:45 AM, Christos Zoulas 
> <christos%zoulas.com@localhost> wrote:
> > On Dec 28,  2:28pm, tsutsui%ceres.dti.ne.jp@localhost (Izumi Tsutsui) wrote:
> > -- Subject: Re: CVS commit: src/sys/kern
> >
> > | > >> Log Message:
> > | > >> - Don't autounload modules loaded during boot. In my case, ffs got 
> > unloaded
> > | > >>  because my cdrom takes too long to initialize.
> > | > > is this the right thing to do ? it seems more a workaround than a fix
> > | > > of the obviously buggy auto-unload code.
> > | >
> > | > Preloaded modules are special in that they are required to bootstrap the
> > | > system. If they are unloaded before the kernel can mount the root
> > | > filesystem there is no hope if loading them again.
> > |
> > | It might be better to make bootstrap modules unloadable after mountroot
> > | (or just disable autounloading modules until mountroot)?
> >
> > I had:
> >
> >        extern int start_init_exec;
> >
> >        if (!start_init_exec)
> >                return EBUSY;
> >
> > in module_do_unload(), but that seemed kludgy to me.
> >
> couldn't the MODULE_CMD_AUTOUNLOAD be used in any way to achieve this ?
> 
> This would let the control of the unloading to the module rather than
> a system wide condition (mountroot or no unload at all). We can
> imagine module loaded at boot that would be required for some
> operation before mountroot happens and that would not be required
> after boot.

That would mean adding code to each module that might be required to mount
the root file system. All network and disk device drivers, all file systems,
etc.

Andrew


Home | Main Index | Thread Index | Old Index