Re: PATCH: move more functions and data into init memory (2.1.89)

Jakub Jelinek (jj@sunsite.ms.mff.cuni.cz)
Wed, 11 Mar 1998 12:18:00 +0100 (MET)


>
> On Wed, 11 Mar 1998, Jakub Jelinek wrote:
>
> > > I am not so sure about the best method getting init strings into the
> > > initdata segment. I haven't found a clean method like
> > >
> > > "foobar" __initdata
> >
> > There is none, unless you do:
> >
> > static char mystring[] __initdata = "That string";
>
> That's what my patch does... :)

I don't like doing that. Yes, you save 4K, but you decrease readability of
kernel sources a lot. You can waste one page with anything else. I started
with __init stuff 'cause it makes a big difference in my eyes. On sparc64 I
now have 144k of init stuff, plus in some modules it makes a big difference
as well, like myri_sbus...

>
> > do in this area, e.g. if gcc optimizes away some part of code which has the
> > only occurence of some string, it does not have to be in the resulting
> > binary at all...
>
> But this is not too fatal (except of low-memory machines) because it will
> be freed later...

No, it is. Most of the routines in the kernel are not __init, plus all
userland routines are not __init...

Cheers,
Jakub
___________________________________________________________________
Jakub Jelinek | jj@sunsite.mff.cuni.cz | http://sunsite.mff.cuni.cz
Administrator of SunSITE Czech Republic, MFF, Charles University
___________________________________________________________________
Ultralinux - first 64bit OS to take full power of the UltraSparc
Linux version 2.1.89 on a sparc64 machine (498.80 BogoMips).
___________________________________________________________________

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu