[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1387898870.2259.48.camel@joe-AO722>
Date: Tue, 24 Dec 2013 07:27:50 -0800
From: Joe Perches <joe@...ches.com>
To: Wang YanQing <udknight@...il.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] softirq: Use const char * const for
softirq_to_name, whitespace neatening
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists