From: Joe Perches <joe@perches.com>
To: Jan Kara <jack@suse.cz>
Cc: linux-ext4@vger.kernel.org, Theodore Ts'o <tytso@mit.edu>,
linux-kernel@vger.kernel.org,
linux-embedded <linux-embedded@vger.kernel.org>,
openwrt-hackers@openwrt.org
Subject: Re: [PATCH 1/2] ext2: Reduce object size when !CONFIG_PRINTK
Date: Fri, 21 Jun 2013 10:06:23 -0700 [thread overview]
Message-ID: <1371834383.19215.44.camel@joe-AO722> (raw)
In-Reply-To: <20130621165049.GP13932@quack.suse.cz>
On Fri, 2013-06-21 at 18:50 +0200, Jan Kara wrote:
> On Tue 18-06-13 10:14:39, Joe Perches wrote:
> > Reducing the object size ~5kb/15% could be useful for embedded
> > systems.
> >
> > Add #ifdef CONFIG_PRINTK #else #endif blocks
> > to hold formats and arguments, passing " " to
> > functions when !CONFIG_PRINTK and still verifying
> > format and arguments with no_printk.
> >
> > $ size fs/ext2/built-in.o*
> > text data bss dec hex filename
> > 31297 44 4 31345 7a71 fs/ext2/built-in.o.ext2.new
> > 36288 44 4 36336 8df0 fs/ext2/built-in.o.ext2.old
> >
> > $ grep -E "CONFIG_EXT2|CONFIG_PRINTK" .config
> > # CONFIG_PRINTK is not set
> > CONFIG_EXT2_FS=y
> > # CONFIG_EXT2_FS_XATTR is not set
> > # CONFIG_EXT2_FS_XIP is not set
> I'm somewhat reluctant to merge this unless I know someone really
> cares. It looks a bit ugly to ifdef every function doing some printing just
> to reduce object size when CONFIG_PRINTK is disabled... And in future LTO
> might help us ;)
(adding cc's to linux-embedded and openwrt
maybe someone there cares)
Link time optimization might help some, but these calls
are still made and the strings could not be eliminated
without this.
Original patch: http://patchwork.kernel.org/patch/2744401/
prev parent reply other threads:[~2013-06-21 17:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-18 17:14 [PATCH 1/2] ext2: Reduce object size when !CONFIG_PRINTK Joe Perches
2013-06-18 17:14 ` [PATCH 2/2] ext3: " Joe Perches
2013-06-21 16:50 ` [PATCH 1/2] ext2: " Jan Kara
2013-06-21 17:06 ` Joe Perches [this message]
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=1371834383.19215.44.camel@joe-AO722 \
--to=joe@perches.com \
--cc=jack@suse.cz \
--cc=linux-embedded@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=openwrt-hackers@openwrt.org \
--cc=tytso@mit.edu \
/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;
as well as URLs for NNTP newsgroup(s).