From: Tim Bird <tim.bird@am.sony.com>
To: Adrian Bunk <adrian.bunk@movial.fi>
Cc: linux-tiny <Linux-tiny@selenic.com>,
linux-embedded <linux-embedded@vger.kernel.org>,
linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] console - Add configurable support for console charset translation
Date: Wed, 4 Jun 2008 11:51:54 -0700 [thread overview]
Message-ID: <4846E44A.1010601@am.sony.com> (raw)
In-Reply-To: <20080604103353.GC27335@cs181133002.pp.htv.fi>
Adrian Bunk wrote:
> It seems to be always me who asks the controversial questions...:
>
> Does the linux-tiny approach of adding a kconfig variable for each 5kB
> of code actually make sense? I'm asking since an exploding amount of
> kconfig variables and their interdependencies have a not so small
> maintainance impact in the long term.
Others have expressed similar concerns. Andi Kleen has brought this
up in the past, and highlighted another aspect of this that I think
is important - fragmenting the configuration space for testing.
That is, if different combinations of options are used, then the
testing results from different users may not be directly comparable.
This makes it harder to track down bugs.
In practice, I think these types of switches tend to get turned
on/off together. This tends to ameliorate the testing and maintenance
issues. It might be worthwhile to coalesce these into fewer
options. I'd be fine with overloading this particular
onto CONFIG_BASE_FULL, but I don't know what other people think.
Keeping the option separate means you have more flexibility - so
that you can, for example, turn off all but one feature that's
important to you. (This seems like a pretty common
> And I'm wondering whether it's the best approach for reaching
> measurable results. E.g. my small patch that removed
> -maccumulate-outgoing-args on 32-bit x86 reduced the kernel size
> there for the CONFIG_CC_OPTIMIZE_FOR_SIZE=y case by at about 2.5% (sic)
> without adding any kconfig variables or #ifdef's.
These are certainly nice, but there's a limited number of whole-kernel
reduction options. Kernel size accumulates by both wasteful
compiler output, and by the introduction or preservation of individual
features that are useless for embedded devices. I think it's worthwhile
to attack both problems.
> Can you take a reasonable (best-case) .config for an existing device and
> get the following numbers:
> - Ignoring patches that came from linux-tiny, by how many percent did
> the size of the kernel increase or decrease between 2.6.16 and 2.6.26?
Well, an initial comparison is at:
http://www.selenic.com/bloatwatch/?cmd=compare&part=%2F&v1=2.6.16&v2=2.6.25-rc2
This shows a size difference of 1.8 meg, but I'm pretty sure this
is with a default config (not optimized) and is not controlled very well
for changes in the config.
I can do a more controlled comparison if you're interested.
> - By how many percent did the kernel size decrease due to patches from
> the linux-tiny project that added such kconfig options for a few kB
> of code in the same timeframe?
I'm not sure that's a good comparison, since Linux-tiny hasn't been
very active in that time period. I would guess only about 3 or 4
Linux-tiny patches have made it into the kernel since 2.6.16.
The big wins for Linux-tiny were in the 2.6.10/11 kernels, where
most of the low-hanging fruit (size-wise) was gleaned.
But to address your point, you're right that no existing Linux-tiny
patch gets 2.5% reduction for the kernel.
In my own testing at Sony, the 30 or so Linux-tiny patches that
I use get me about 110k of reductions. For me, this is about 5% of
my kernel size. Note that my choice of options to achieve
reductions is pretty conservative.
There are diminishing returns here, and at some point it doesn't make
sense to continue. I have a nagging feeling, though, that there
are a few more things where the bloat is pronounced (glances at
procfs and sysfs).
> My gut feeling is that the influence of this kind of linux-tiny patches
> is hardly noticably compared to the overall code size development, but
> if you have numbers that prove me wrong just point me to them and I'll
> stand corrected.
It *does* feel a bit like fighting the tide with a teaspoon.
-- Tim
=============================
Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Corporation of America
=============================
next prev parent reply other threads:[~2008-06-04 18:52 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-02 22:37 [PATCH] console - Add configurable support for console charset translation Tim Bird
2008-06-03 1:34 ` H. Peter Anvin
2008-06-03 7:00 ` Jamie Lokier
2008-06-03 15:46 ` Matt Mackall
2008-06-03 8:36 ` David Woodhouse
2008-06-03 13:45 ` David Woodhouse
2008-06-03 14:06 ` Holger Schurig
2008-06-03 14:10 ` David Woodhouse
2008-06-04 0:01 ` Tim Bird
2008-06-04 0:16 ` David Woodhouse
2008-06-04 1:03 ` Josh Boyer
2008-06-04 1:05 ` David Woodhouse
2008-06-04 3:13 ` Josh Boyer
2008-06-04 9:16 ` David Woodhouse
2008-06-04 10:07 ` Adrian Bunk
2008-06-04 10:10 ` David Woodhouse
2008-06-04 15:35 ` Tim Bird
2008-06-04 11:55 ` Alan Cox
2008-06-04 13:55 ` David Woodhouse
2008-06-04 14:07 ` Alan Cox
2008-06-04 14:27 ` David Woodhouse
2008-06-04 10:33 ` Adrian Bunk
2008-06-04 17:51 ` Rob Landley
2008-06-04 18:34 ` Bernhard Fischer
2008-06-04 19:01 ` Adrian Bunk
2008-06-04 19:21 ` Bernhard Fischer
2008-06-04 19:20 ` Alan Cox
2008-06-04 18:51 ` Tim Bird [this message]
2008-06-04 19:15 ` Sam Ravnborg
2008-06-04 19:23 ` Tim Bird
2008-06-04 20:23 ` Adrian Bunk
2008-06-04 20:42 ` Tim Bird
2008-06-05 6:55 ` Jörn Engel
2008-06-05 7:18 ` Uwe Klein
2008-06-04 20:24 ` Jörn Engel
2008-06-04 19:40 ` Adrian Bunk
2008-06-06 23:47 ` Tim Bird
2008-06-07 4:29 ` Rob Landley
2008-06-10 1:37 ` mainlining min-configs Tim Bird
2008-06-10 3:14 ` Ben Nizette
2008-06-10 4:16 ` Paul Mundt
2008-06-10 8:36 ` Adrian Bunk
2008-06-10 18:18 ` Tim Bird
2008-06-10 18:30 ` Adrian Bunk
2008-06-10 18:51 ` Sam Ravnborg
2008-06-10 19:05 ` Adrian Bunk
2008-06-11 5:09 ` Rob Landley
2008-06-11 6:39 ` Sam Ravnborg
2008-06-11 19:09 ` Tim Bird
2008-06-11 19:22 ` Sam Ravnborg
2008-06-11 19:36 ` Adrian Bunk
2008-06-11 19:46 ` Tim Bird
2008-06-12 1:42 ` Rob Landley
2008-06-11 19:48 ` Sam Ravnborg
2008-06-12 0:01 ` Rob Landley
2008-06-11 5:17 ` Rob Landley
2008-06-11 5:51 ` Rob Landley
2008-06-11 3:48 ` Rob Landley
2008-06-11 3:32 ` Rob Landley
2008-06-11 8:59 ` Christian MICHON
2008-06-04 19:42 ` [PATCH] console - Add configurable support for console charset translation Bernhard Fischer
2008-06-11 7:08 ` Holger Schurig
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=4846E44A.1010601@am.sony.com \
--to=tim.bird@am.sony.com \
--cc=Linux-tiny@selenic.com \
--cc=adrian.bunk@movial.fi \
--cc=linux-embedded@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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