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

> | 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.
>
> I would venture to guess that it is older than Linux. I first ran across it in
> 1975-1979 when I went to college and hacked on CDC 6[46]00 systems, where it
> was common to put the init code in the area you would use as buffers. I
> imagine that it is much older than that.

The SPARC port already implements the ability to throw init code and
data out the door into the bit bucket after system setup. It should be
in the mainline kernel whenever Linus syncs the main tree to the SPARC
port's tree.

Every piece of init code and data is tagged with the magical "section"
gcc attribute. Init code ends up in ELF section "text.init" and init
data ends up in "data.init". It is similar to the magical section
tricks done with the new exception handling mechanism.

During the link stage, we arrange for the text.init and data.init
sections to be last in the executable. After system setup, the init
code/data gets reassigned as free pages. Viola!

Tom

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