lkml.org 
[lkml]   [1996]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Possible kernel optimization
From
Date


> > this is an idea that I think possible.
> >
> > It is possible to fit all the driver initialization & probing code in a
> > separate ELF section that can be discarded after kernel initializations ?
> >
> > This code, after the kernel initialization, is unused, why don't free it ?
>
> heh :) when i first read the ELF standard i came up with the very same
> idea ... then i was told that this idea is almost as old as Linux itself,
> and that it comes up regularly on linux-kernel, but nobody has done it so
> far.

This has been done in the Linux/SPARC kernel sources by Jakub Jelinek
and David Miller based on the idea from Eric Youngdale. The init code
and data are marked and moved to a special section and just before the
kernel finishes its startup, all of that memory is released.

It seems it will be in the next DaveM Jumbo Patch sent to Linus.

> - define an 'init module'. This 'module' can be unloaded after booting
> has finished. Just by calling 'rmmod initmodule' from user-space.
>
> the boot code has to set up this 'module', and we need support from the
> kernel image linker too. The kernel could decrease the kernel usage
> counter once all init functions in it were called?

Maybe you can convince Jakub on this. Anyways, the changed have been
done and are being used successfully on the SPARC port.

Cheers,
--
miguel@roxanne.nuclecu.unam.mx
The GNU Midnight Commander: http://www.linux.org/mc
Linux/SPARC project: http://www.geog.ubc.ca/sparclinux.html

\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.063 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site