All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Aaro Koskinen <aaro.koskinen@nokia.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	linux-omap@vger.kernel.org, Thomas Petazzoni <t-petazzoni@ti.com>
Subject: Re: [PATCH 1/6] Add infrastructure for conditional code and data sections
Date: Thu, 23 Dec 2010 10:02:43 -0800	[thread overview]
Message-ID: <20101223180243.GM7771@atomide.com> (raw)
In-Reply-To: <alpine.DEB.1.10.1012231406120.18898@esdhcp041196.research.nokia.com>

* Aaro Koskinen <aaro.koskinen@nokia.com> [101223 04:31]:
> Hi,
> 
> On Wed, 22 Dec 2010, Tony Lindgren wrote:
> >* Thomas Petazzoni <thomas.petazzoni@free-electrons.com> [101221 14:00]:
> >>On Tue, 21 Dec 2010 11:27:35 -0800
> >>Tony Lindgren <tony@atomide.com> wrote:
> >>>>Therefore, we introduce an infrastructure that allows to put code
> >>>>and data into specific sections, called "conditional sections". All
> >>>>those sections are compiled into the final kernel image, but at
> >>>>runtime, by calling a function, we can get rid of the unused
> >>>>sections.
> >>>
> >>>Great, something is certainly needed to free the unused memory.
> >>
> >>Nice to see that the idea is welcome. Did you had a look at the
> >>implementation in patch 1/6 ?
> >
> >No not yet, will take a look after we're done with this upcoming
> >merge window..
> 
> I also think the idea is good, and this should be maybe posted to wider
> audience than just linux-omap.
> 
> >>However, in order to be able to free each section independently from
> >>another, I have to page align all those conditional sections. This
> >>means that having one section for only a tiny amount of data is going
> >>to waste space instead of saving space. So the conditional section
> >>should gather a sufficiently large amount of data (> 4 KB) to actually
> >>be valuable.
> >
> >Yeah I don't know how much non-init data we have for each board-*.c
> >file. Maybe there is not much for each machine.
> 
> I took a quick look at omap2plus_defconfig kernel, and non-init text/data
> for 29 boards takes 85K. If we would page align those memory consumption
> would increase during init to 29*8=232K, but after other boards are
> freed we would eventually save 85-8=77K.

That does not sounds like a huge savings as some bootloaders like nolo
have a 2MB kernel size limitation..
 
> Under mach-omap2, another big consumer is clock data which takes also
> around 80 K, while e.g. on 2420 only 14 K is needed.

This eventually should be all __initdata and only the clock data for
the booted omap should be allocated during the boot.

Sounds like the best way to reduce the size of the image immediately
is to make everything possible a module for the defconfigs, then
use the standard minimal kernel + initramfs booting. That will make
it easy for all the distros to use it too.

Regards,

Tony

  parent reply	other threads:[~2010-12-23 18:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-21 18:19 [RFC] Infrastructure for dynamic removal of code and data sections Thomas Petazzoni
2010-12-21 18:19 ` [PATCH 1/6] Add infrastructure for conditional " Thomas Petazzoni
2010-12-21 19:27   ` Tony Lindgren
2010-12-21 22:00     ` Thomas Petazzoni
2010-12-22 18:28       ` Tony Lindgren
2010-12-22 18:42         ` Thomas Petazzoni
2010-12-22 19:02           ` Tony Lindgren
2010-12-23 12:31         ` Aaro Koskinen
2010-12-23 12:44           ` Thomas Petazzoni
2010-12-23 18:02           ` Tony Lindgren [this message]
2011-01-03  3:37   ` Paul Walmsley
2011-01-03  8:08     ` Paul Walmsley
2010-12-21 18:20 ` [PATCH 2/6] omap: add macros to mark SoC-specific data/code Thomas Petazzoni
2010-12-21 18:20 ` [PATCH 4/6] omap3: mark some data as omap3-specific Thomas Petazzoni
2010-12-21 18:20 ` [PATCH 5/6] omap4: mark some data as omap4-specific Thomas Petazzoni
2010-12-21 18:20 ` [PATCH 6/6] omap3: beagle: get rid of unused omap2/omap4 specific code/data Thomas Petazzoni
2010-12-21 19:15   ` Menon, Nishanth
2010-12-21 21:57     ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101223180243.GM7771@atomide.com \
    --to=tony@atomide.com \
    --cc=aaro.koskinen@nokia.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=t-petazzoni@ti.com \
    --cc=thomas.petazzoni@free-electrons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.