lkml.org 
[lkml]   [2012]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sched: reduce /proc/schedstat access times

* Eric Dumazet <eric.dumazet@gmail.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


\
 
 \ /
  Last update: 2012-02-03 08:55    [W:3.636 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site