Messages in this thread |  | | Subject | Re:Possible kernel optimizati | Date | Fri, 13 Dec 96 15:59:26 CET | From | Tekno Soft Snc <> |
| |
>> 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. > > now that we definitely do ELF bootloading only, it's the right time to > start thinking about the details? :) > > btw, imho it would be cleaner if we did it this way: > > - 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?
Hmmm! I guess that can be done in this way:
- Fitting the initialization code in a section (gcc the do this with a directive like #pragma section xyz ? I don't know the gcc very well)
- The linker can fit all the inizialization code in a separate ELF section (like new exceptions handling), a this point we know the section start/end address (this section must be aligned to a page ?)
- After the kernel initialization we can mark this section (=group of pages), we know the start/end address, as free.
Roberto Fichera - email MC3641@mclink.it
Xmeo ver.3.0 Alpha for Linux & Windows
|  |