Messages in this thread |  | | From | Jakub Jelinek <> | Subject | Re: Jettisoning initialization code... | Date | Sun, 26 Jan 1997 21:33:11 +0100 (MET) |
| |
> > There was some talk not too long ago about freeing up memory used by > functions and data that are only referenced during initialization by > grouping them together into their own ELF section that could be > discarded after setup was complete. I was looking at the Sparc stuff in > 2.1.23 to see how this was done. > > I probably missed it, but where in the code do the text.init and > data.init sections get released?
arch/sparc/mm/init.c (free_initmem) - this one is called at the end of sys_setup, ie. just after mounting the root filesystem. On the sparc, we use arch/sparc/vmlinux.lds ld script, so that both init sections are a) combined together b) beginning is page aligned c) end is page aligned as well (then we achieve to free more than we used to and free_initmem is simpler). > > And is anybody working on adding this functionality to the Intel kernel > yet?
This requires someone to write arch/i386/mm/init.c free_initmem and test the stuff. And then start adding different functions (but it requires to think twice before adding, like most of the fs initialization code is not a good thing to add, as it is called on mount, etc.). Adding the global functions and data will help all the ports at once (at the moment just some sparc-only functions are marked __initfunc).
.u$e. Cheers .$$$$$:S Jakub $"*$/"*$$ $.`$ . ^F 4k+#+T.$F -------------------------------------------------------------- 4P+++"$"$ --- Jakub Jelinek, jj@sunsite.mff.cuni.cz :R"+ t$$B Administrator of SunSITE Czech Republic ___# $$$ MFF, Charles University, Prague | | R$$k ---------------------------------------------------------- dd. | Linux $!$ Give your Sparc a new beginning - SparcLinux ddd | Sparc $9$F -------------------------------------------------------- '!!!!!$ !!#!` !!!!!* .!!!!!` '!!!!!!!W..e$$!!!!!!` "~^^~ ^~~^
|  |