lkml.org 
[lkml]   [2012]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] proc: speedup /proc/stat handling
On Fri, 27 Jan 2012 10:09:33 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.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.


\
 
 \ /
  Last update: 2012-01-27 02:21    [W:0.122 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site