Re: [patch] uninline init_waitqueue_*() functions
From: Ingo Molnar
Date: Wed Jul 05 2006 - 07:37:46 EST
* Ingo Molnar <mingo@xxxxxxx> wrote:
> * Andrew Morton <akpm@xxxxxxxx> wrote:
>
> > > > shrinks fs/select.o by eight bytes. (More than I expected). So
> > > > it does appear to be a space win, but a pretty slim one.
> > >
> > > there are 855 calls to these functions in the allyesconfig vmlinux i
> > > did, and i measured a combined size reduction of 34791 bytes. That
> > > averages to a 40 bytes win per call site. (on i386.)
> > >
> >
> > Yes, but that lumps all three together. init_waitqueue_head() is
> > obviously the porky one. And it's porkier with CONFIG_DEBUG_SPINLOCK
> > and CONFIG_LOCKDEP, which isn't the case to optimise for.
>
> true. I redid my tests with both lockdep and debug-spinlocks turned off:
>
> text data bss dec filename
> 21172153 6077270 3081864 30331287 vmlinux.x32.after
> 21198222 6077106 3081864 30357192 vmlinux.x32.before
>
> with 851 callsites that's a 30.6 bytes win per call site (total 26K) -
> still not bad at all.
and that was with CONFIG_CC_OPTIMIZE_FOR_SIZE enabled. With
optimize-for-size disabled the win goes up to 32.6 bytes (total 28K).
Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/