From: Guillaume Chazarain <guichaz@yahoo.fr>
To: Jonathan Lim <jlim@sgi.com>
Cc: balbir@linux.vnet.ibm.com,
akpm@linux-foundation.org (Andrew Morton),
linux-kernel@vger.kernel.org (Linux Kernel Mailing List),
jlan@cthulhu.engr.sgi.com (Jay Lan)
Subject: Re: [PATCH] Add all thread stats for TASKSTATS_CMD_ATTR_TGID
Date: Mon, 10 Sep 2007 15:03:06 +0200 [thread overview]
Message-ID: <20070910150306.3f460863@localhost.localdomain> (raw)
In-Reply-To: <200709072337.l87Nbv7j430732@sabah.engr.sgi.com>
Le Fri, 7 Sep 2007 16:37:57 -0700 (PDT),
Jonathan Lim <jlim@sgi.com> a écrit :
> > Excellent, so can Guillaume change ac_btime to be just
> > tsk->start_time?
>
> I don't think so. Current time (xtime) is relative to the epoch;
> uptime and tsk->start_time (jiffies) are both relative to some boot
> time. So you need to subtract uptime from xtime to get the boot time
> relative to the epoch, then add tsk->start_time. The result is what
> ac_btime should be set to.
>
> I think his recent changes are as follows:
>
> --- a/kernel/tsacct.c Fri Aug 31 01:42:23 2007 -0700
> +++ b/kernel/tsacct.c Tue Aug 28 20:35:27 2007 +0200
> ...
> -void bacct_add_tsk(struct taskstats *stats, struct task_struct *tsk)
> +static void fill_wall_times(struct taskstats *stats, struct
> task_struct *task) ...
> - ts = timespec_sub(uptime, tsk->start_time);
> + ts = timespec_sub(uptime, task->start_time);
> ...
> - stats->ac_btime = get_seconds() - ts.tv_sec;
> ...
> + stats->ac_btime = get_seconds() - ts.tv_sec;
>
> So really no different from before, which is correct.
Yes, I just tried to make it clearer that the computations were needed
to get a wall time. Otherwise, as CSA seems to start using taskstats,
do my changes make sense for your usage?
Thanks.
--
Guillaume
next prev parent reply other threads:[~2007-09-10 13:04 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-02 13:53 [PATCH] Add all thread stats for TASKSTATS_CMD_ATTR_TGID Guillaume Chazarain
2007-08-02 19:04 ` Andrew Morton
2007-08-19 19:34 ` Guillaume Chazarain
2007-08-20 17:01 ` Balbir Singh
2007-08-25 15:10 ` Guillaume Chazarain
2007-08-26 4:58 ` Balbir Singh
2007-08-26 9:44 ` Guillaume Chazarain
2007-08-31 3:02 ` Jonathan Lim
2007-08-31 7:24 ` Balbir Singh
2007-08-31 12:35 ` Add all thread stats for TASKSTATS_CMD_ATTR_TGID (v3) Guillaume Chazarain
2007-09-13 0:18 ` Andrew Morton
2007-09-15 18:42 ` Add all thread stats for TASKSTATS_CMD_ATTR_TGID (v4) Guillaume Chazarain
2007-09-17 22:23 ` Add all thread stats for TASKSTATS_CMD_ATTR_TGID (v5) Guillaume Chazarain
2007-09-18 15:29 ` Oleg Nesterov
2007-09-20 6:20 ` Andrew Morton
2007-09-20 8:54 ` Balbir Singh
2007-09-20 12:16 ` Oleg Nesterov
2007-09-20 12:17 ` Balbir Singh
2007-09-07 23:37 ` [PATCH] Add all thread stats for TASKSTATS_CMD_ATTR_TGID Jonathan Lim
2007-09-10 13:03 ` Guillaume Chazarain [this message]
2007-08-15 7:15 ` Balbir Singh
-- strict thread matches above, loose matches on Subject: below --
2007-08-02 13:34 Guillaume Chazarain
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=20070910150306.3f460863@localhost.localdomain \
--to=guichaz@yahoo.fr \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=jlan@cthulhu.engr.sgi.com \
--cc=jlim@sgi.com \
--cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).