From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: Mark Seger <Mark.Seger@hp.com>
Cc: Shailabh Nagar <nagar@watson.ibm.com>,
Balbir Singh <balbir@in.ibm.com>, Jes Sorensen <jes@sgi.com>,
Chris Sturtivant <csturtiv@sgi.com>, Tony Ernst <tee@sgi.com>,
Guillaume Thouvenin <guillaume.thouvenin@bull.net>,
Jay Lan <jlan@engr.sgi.com>,
linux-kernel@vger.kernel.org
Subject: Re: taskstats and /proc/.../io asymmetry?
Date: Fri, 16 May 2008 09:19:59 +0530 [thread overview]
Message-ID: <482D0467.5080201@linux.vnet.ibm.com> (raw)
In-Reply-To: <482AC60D.8020207@hp.com>
Mark Seger wrote:
> If you look at /proc/pid/stat, you can get the total CPU consumed by a
> process. If you look at /proc/pid/task/tid/stat you can get the cpu
> consumed by a thread and if the tid is that of the parent you only gets
> its consumption as opposed to all its children.
>
> I was surprised to see that the way process I/O is reported doesn't
> follow this model. There are no /prod/pid/task/tid/io entries but
> rather you need to look in /proc/tid/io. While I view this as a minor
> inconvenience, I can certainly live with it. However, /proc/pid/io does
> not show the aggregate I/O numbers for the whole process and that both
> surprises and disappoints. This means if I have a process that starts a
> bunch of worker threads that do the real work and I want to find the top
> I/O consumers I can't simply walk the /proc/pid tree but rather have to
> look at all the threads of each process and add them up.
>
> Or am I missing something?
>
I looked through the code and your argument seems to be correct. The behaviour
is inconsistent w.r.t. other statistics like utime and stime. We currently
accumulate tgid information in signal_struct, we need to do something similar
for io as well. If nobody gets to it by the time I finish my backlog, I'll try
and get to it.
--
Warm Regards,
Balbir Singh
Linux Technology Center
IBM, ISTL
prev parent reply other threads:[~2008-05-16 3:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-14 10:59 taskstats and /proc/.../io asymmetry? Mark Seger
2008-05-16 3:49 ` Balbir Singh [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=482D0467.5080201@linux.vnet.ibm.com \
--to=balbir@linux.vnet.ibm.com \
--cc=Mark.Seger@hp.com \
--cc=balbir@in.ibm.com \
--cc=csturtiv@sgi.com \
--cc=guillaume.thouvenin@bull.net \
--cc=jes@sgi.com \
--cc=jlan@engr.sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nagar@watson.ibm.com \
--cc=tee@sgi.com \
/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.