lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120131085820.cba068d6.kamezawa.hiroyu@jp.fujitsu.com>
Date:	Tue, 31 Jan 2012 08:58:20 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
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] Add num_to_str() for speedup /proc/stat

On Mon, 30 Jan 2012 15:20:51 -0800
Andrew Morton <akpm@...ux-foundation.org> wrote:

> On Mon, 30 Jan 2012 14:16:19 +0900
> KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> wrote:
> 
> > From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
> > Date: Mon, 30 Jan 2012 14:15:12 +0900
> > Subject: [PATCH] Add num_to_str() for speedup /proc/stat
> > On my 8cpu box.
> > == Before patch ==
> > [root@...extal test]# time ./stat_check.py
> > 
> > real    0m0.150s
> > user    0m0.026s
> > sys     0m0.121s
> > 
> > == After patch ==
> > [root@...extal test]# time ./stat_check.py
> > 
> > real    0m0.055s
> > user    0m0.022s
> > sys     0m0.030s
> > 
> > Maybe it's worth to add this simple function.
> 
> I suppose so - the new infrastructure can be used elsewhere.
> 
> I tried doing the
> 
> 	if (kstst_irqs(j) == 0) {
> 		seq_putc(p, ' ');
> 		seq_putc(p, '0');
> 
> think on top of this and didn't observe any improvement.
> 
> 
> I made some changes - please review.  I'm not sure why you did "char
> tmp[66]"?
> 
Your fix seems fine to me.
I'm sorry I copied tmp[66] from number()..

and yes, 0xffffffffffffffff=18446744073709551615 , tmp[21] will be enough.

I'll prepare patch for /proc/<pid>/stat and see 'ps' and 'top' performance.

Thanks,
-Kame

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ