mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Wang YanQing <udknight@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] softirq: Use const char * const for softirq_to_name, whitespace neatening
Date: Tue, 24 Dec 2013 07:27:50 -0800	[thread overview]
Message-ID: <1387898870.2259.48.camel@joe-AO722> (raw)
In-Reply-To: <20131224151904.GA3398@udknight>

On Tue, 2013-12-24 at 23:19 +0800, Wang YanQing wrote:
> On Sun, Nov 17, 2013 at 01:55:12AM -0800, Joe Perches wrote:
> > Reduce data size a little.
> > Reduce checkpatch noise.
> > 
> > $ size kernel/softirq.o*
> >    text	   data	    bss	    dec	    hex	filename
> >   11554	   6013	   4008	  21575	   5447	kernel/softirq.o.new
> >   11474	   6093	   4008	  21575	   5447	kernel/softirq.o.old
> 
> Hi, could you tell me why this patch could reduce data size?

It moves the softirq_to_name array of 10 char *
from data (non-const) to text (const).

-char *softirq_to_name[NR_SOFTIRQS] = {
+const char * const softirq_to_name[NR_SOFTIRQS] = {
        "HI", "TIMER", "NET_TX", "NET_RX", "BLOCK", "BLOCK_IOPOLL",
        "TASKLET", "SCHED", "HRTIMER", "RCU"
 };

Use objdump or "make kernel/softirq.lst" and inspect
the object code produced to see for yourself.

cheers, Joe


  reply	other threads:[~2013-12-24 15:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-17  9:55 [PATCH 0/3] softirq: possible speedup and neatenings Joe Perches
2013-11-17  9:55 ` [PATCH 1/3] softirq: Use ffs in __do_softirq Joe Perches
2013-12-09 18:44   ` Frederic Weisbecker
2013-12-09 18:56     ` Joe Perches
2013-12-09 19:13       ` Frederic Weisbecker
2013-11-17  9:55 ` [PATCH 2/3] softirq: Convert printks to pr_<level> Joe Perches
2013-11-17  9:55 ` [PATCH 3/3] softirq: Use const char * const for softirq_to_name, whitespace neatening Joe Perches
2013-12-24 15:19   ` Wang YanQing
2013-12-24 15:27     ` Joe Perches [this message]
2013-12-09 17:22 ` [PATCH 0/3] softirq: possible speedup and neatenings Joe Perches

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=1387898870.2259.48.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=udknight@gmail.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

all inboxes | Powered by JetHome®