From: Ingo Molnar <mingo@elte.hu>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Arnaldo Carvalho de Melo <acme@infradead.org>
Subject: Re: [PATCH] sched: reduce /proc/schedstat access times
Date: Fri, 3 Feb 2012 08:52:50 +0100 [thread overview]
Message-ID: <20120203075250.GD30543@elte.hu> (raw)
In-Reply-To: <1328216139.2480.24.camel@edumazet-laptop>
* 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
prev parent reply other threads:[~2012-02-03 7:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-02 20:55 [PATCH] sched: reduce /proc/schedstat access times Eric Dumazet
2012-02-03 7:52 ` Ingo Molnar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120203075250.GD30543@elte.hu \
--to=mingo@elte.hu \
--cc=acme@infradead.org \
--cc=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.