From: Ingo Molnar <mingo@elte.hu>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Chris Friesen <chris.friesen@genband.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: RFC: /proc/<pid>/sched should contain cumulative data for all threads in process
Date: Tue, 8 Feb 2011 13:11:44 +0100 [thread overview]
Message-ID: <20110208121144.GA7550@elte.hu> (raw)
In-Reply-To: <1297156865.13327.57.camel@laptop>
* Peter Zijlstra <peterz@infradead.org> wrote:
> On Mon, 2011-02-07 at 16:29 -0600, Chris Friesen wrote:
> > Hi,
> >
> > We've got a tool that gathers lots of scheduling data for each process
> > (not task/thread) on the system.
> >
> > For /proc/<pid>/{stat,io} this is straightforward, as the per-thread
> > values are summed together for the process as a whole.
> >
> > However, /proc/<pid>/sched only shows the data for the individual thread
> > with the same tid as the pid. To get a per-process view we need to
> > manually scan all the threads and sum them--and this can get expensive
> > due to all the extra file operations, parsing, etc.
> >
> > Was this a concious design decision, or just an oversight? Would a
> > patch converting it to whole-process values be accepted or is it enough
> > of a standard interface that we can't break existing apps that expect
> > the current behaviour?
>
> I'd as soon remove all that stuff than extend it, its an abi liability,
> esp since you're talking about tools parsing this stuff.
So assuming a tool would want to capture such stats of the system, what would be its
options? Could we do all this via system-wide counters and perf stat alike cheap,
transparent gathering without having to patch/rebuild the kernel?
Thanks,
Ingo
next prev parent reply other threads:[~2011-02-08 12:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-07 22:29 RFC: /proc/<pid>/sched should contain cumulative data for all threads in process Chris Friesen
2011-02-08 9:21 ` Peter Zijlstra
2011-02-08 12:11 ` Ingo Molnar [this message]
2011-02-08 13:45 ` Peter Zijlstra
2011-02-08 15:14 ` Ingo Molnar
2011-02-09 17:28 ` Chris Friesen
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=20110208121144.GA7550@elte.hu \
--to=mingo@elte.hu \
--cc=chris.friesen@genband.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox