[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120126171800.01c2405c.akpm@linux-foundation.org>
Date: Thu, 26 Jan 2012 17:18:00 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc: Eric Dumazet <eric.dumazet@...il.com>,
Glauber Costa <glommer@...allels.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
Russell King - ARM Linux <linux@....linux.org.uk>,
Paul Tuner <pjt@...gle.com>
Subject: Re: [PATCH v2] proc: speedup /proc/stat handling
On Fri, 27 Jan 2012 10:09:33 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> wrote:
> > I expect most of these numbers are zero. I wonder if we would get
> > useful speedups from
> >
> > for_each_irq_nr(j) {
> > /* Apologetic comment goes here */
> > if (kstat_irqs(j))
> > seq_printf(p, " %u", kstat_irqs(j));
> > else
> > seq_puts(p, " 0");
> > }
>
> Yes. This is very good optimization and shows much optimization.
> I did this at first try but did complicated ones because it seems
> not interesting. (This is my bad habit...)
>
> I'll try again and measure time.
seq_puts() is too slow ;) I bet seq_putc(p, ' ');seq_putc(p, '0') will
complete in negative time.
--
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