Messages in this thread | | | Date | Fri, 3 Feb 2012 08:52:50 +0100 | From | Ingo Molnar <> | Subject | Re: [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
| |