public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: Aaro Koskinen <aaro.koskinen@nokia.com>
Cc: Tony Lindgren <tony@atomide.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 13:44:21 +0100	[thread overview]
Message-ID: <20101223134421.6f33effd@surf> (raw)
In-Reply-To: <alpine.DEB.1.10.1012231406120.18898@esdhcp041196.research.nokia.com>

On Thu, 23 Dec 2010 14:31:46 +0200 (EET)
Aaro Koskinen <aaro.koskinen@nokia.com> wrote:

> > 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.

Yes, definitely. As the proof of concept implementation was
demonstrating usage on OMAP, I wanted to have some early comments of
a few kernel developers before going to a wider audience.

> > 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.

Thanks for those numbers. 77K is nice, but is not really a huge saving.

> 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.

My patch 3/6 (which didn't make it to the list, since it was probably
too large) already marked some OMAP2 clock data.

Unfortunately, I haven't found a nice way of putting strings into a
separate sections. For example:

static struct foobar __omap2 foo = {
	.name = "blabla",
	.id   = 12,
};

The "struct foobar" goes into the OMAP2-specific section (8 bytes), but
the "blabla" string (6 bytes) remains in the global .rodata section,
without anyway from removing it. The only solution I see so far would
be :

static char __omap2 foo_name[] = "blabla";

static struct foobar __omap2 foo = {
	.name = foo_name,
	.id = 12,
};

but it's really unpleasant.

Other ideas ?

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2010-12-23 12:44 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 [this message]
2010-12-23 18:02           ` Tony Lindgren
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=20101223134421.6f33effd@surf \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=aaro.koskinen@nokia.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=t-petazzoni@ti.com \
    --cc=tony@atomide.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox