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] [day] [month] [year] [list]
Message-ID: <20120203075250.GD30543@elte.hu>
Date:	Fri, 3 Feb 2012 08:52:50 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Arnaldo Carvalho de Melo <acme@...radead.org>
Subject: Re: [PATCH] sched: reduce /proc/schedstat access times


* Eric Dumazet <eric.dumazet@...il.com> wrote:

> On a 16 cpus NUMA machine, we can have quite a long /proc/schedstat
> 
> # wc -c /proc/schedstat 
> 8355 /proc/schedstat

Btw., the long-term goal would be to make the schedstats info 
fully available via perf and integrate it into 'perf sched' - or 
'perf stat --sched' or 'perf schedstat' (whichever variant suits 
the person who first implements it).

> @@ -47,9 +43,9 @@ static int show_schedstat(struct seq_file *seq, void *v)
>  		for_each_domain(cpu, sd) {
>  			enum cpu_idle_type itype;
>  
> -			cpumask_scnprintf(mask_str, mask_len,
> -					  sched_domain_span(sd));
> -			seq_printf(seq, "domain%d %s", dcount++, mask_str);
> +			seq_printf(seq, "domain%d ", dcount++);
> +			seq_bitmap(seq, cpumask_bits(sched_domain_span(sd)),
> +				   nr_cpumask_bits);
>  			for (itype = CPU_IDLE; itype < CPU_MAX_IDLE_TYPES;
>  					itype++) {
>  				seq_printf(seq, " %u %u %u %u %u %u %u %u",

that way, via perf, all information gets passed in a binary 
fashion through the perf ring-buffer, so there's no formatting 
overhead (only during post-processing), no restart artifacts due 
to seqfile limitations, etc.

Thanks,

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