Re: [RFC PATCH] meminfo: Break apart a very long seq_printf with #ifdefs

From: Joe Perches
Date: Thu Aug 11 2016 - 17:58:04 EST


On Thu, 2016-08-11 at 14:50 -0700, Andrew Morton wrote:
> On Tue,  9 Aug 2016 23:38:56 -0700 Joe Perches <joe@xxxxxxxxxxx> wrote:
> > Use a specific routine to emit most lines so that the code is
> > easier to read and maintain.
> huh.
>
>    text    data     bss     dec     hex filename
>    2976       8       0    2984     ba8 fs/proc/meminfo.o before
>    2669       8       0    2677     a75 fs/proc/meminfo.o after
>
> Nice.  I wonder why that happened.

Fewer shifts via removal of K macro.
Much smaller call stack in seq_printf.