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: <20101005103650.7ebe64f0.kamezawa.hiroyu@jp.fujitsu.com>
Date:	Tue, 5 Oct 2010 10:36:50 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Jack Steiner <steiner@....com>
Cc:	yinghai@...nel.org, mingo@...e.hu, akpm@...ux-foundation.org,
	linux-kernel@...r.kernel.org
Subject: Re: Problem: scaling of /proc/stat on large systems

On Mon, 4 Oct 2010 09:34:15 -0500
Jack Steiner <steiner@....com> wrote:

> On Thu, Sep 30, 2010 at 02:09:01PM +0900, KAMEZAWA Hiroyuki wrote:
> > On Wed, 29 Sep 2010 07:22:06 -0500
> > Jack Steiner <steiner@....com> wrote:
> 
> 
> I was able to run on the 4096p system over the weekend. The patch is a 
> definite improvement & partially fixes the problem:
> 
> A "cat /proc/stat >/dev/null" improved:
> 
>         OLD:    real    12.627s
>         NEW:    real     2.459
> 
> 
Thank you.

> A large part of the remaining overhead is in the second summation 
>  of irq information:
> 
> 
>     static int show_stat(struct seq_file *p, void *v)
>         ...
>         /* sum again ? it could be updated? */
>         for_each_irq_nr(j) {
>                 per_irq_sum = 0;
>                 for_each_possible_cpu(i)
>                         per_irq_sum += kstat_irqs_cpu(j, i);
> 
>                 seq_printf(p, " %u", per_irq_sum);
>         }
> 
> Can this be fixed using the same approach as in the current patch?
> 
> 

I guess this requres different approarch as per-cpu counter + threshould.
like vmstat[] or lib/percpu_counter. 
Maybe people don't like to access shared counter in IRQ.

But, this seems to call radixtree-lookup for the # of possible cpus.
I guess impleimenting a call to calculate a sum of irqs in a radix-tree
lookup will reduce overhead. If it's not enough, we'll have to make the
counter not-precise. I'll write an another patch.


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