From: linas@austin.ibm.com (Linas Vepstas)
To: Michael Neuling <mikey@neuling.org>
Cc: Andrew Morton <akpm@osdl.org>,
linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>,
linux-kernel@vger.kernel.org,
Balbir Singh <balbir@linux.vnet.ibm.com>
Subject: Re: [PATCH 1/2] Add scaled time to taskstats based process accounting
Date: Thu, 16 Aug 2007 11:38:50 -0500 [thread overview]
Message-ID: <20070816163850.GU4261@austin.ibm.com> (raw)
In-Reply-To: <20070816070922.37B5370074@localhost.localdomain>
On Thu, Aug 16, 2007 at 05:09:22PM +1000, Michael Neuling wrote:
> This adds two items to the taststats struct to account for user and
> system time based on scaling the CPU frequency and instruction issue
> rates.
>
> Adds account_(user|system)_time_scaled callbacks which architectures
> can use to account for time using this mechanism.
There's something simple here that I just don't understand.
> /*
> + * Account scaled user cpu time to a process.
> + * @p: the process that the cpu time gets accounted to
> + * @cputime: the cpu time spent in user space since the last update
> + */
> +void account_user_time_scaled(struct task_struct *p, cputime_t cputime)
> +{
> + p->utimescaled = cputime_add(p->utimescaled, cputime);
> +}
My gut impression (maybe wrong?) is that the scaled time is,
in a certain sense, "more accurate" than the unscaled time.
In fact, the unscaled time gives me the impression of being
rather meaningless, as it has no particular significance
with respect to the wall-clock, and it also doesn't give
any accurate hint of how much cpu resource was actually
consumed.
If one has a cpu with frequency scaling, then when would
one ever be interested in the non-scaled time? If the answer
is "never", then why not just always use the scaled time,
instead of adding more stuff to the kernel structs?
--linas
next prev parent reply other threads:[~2007-08-16 16:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-16 7:09 [PATCH 1/2] Add scaled time to taskstats based process accounting Michael Neuling
2007-08-16 7:26 ` Balbir Singh
2007-08-17 0:23 ` Michael Neuling
2007-08-17 4:47 ` Balbir Singh
2007-08-17 4:56 ` Michael Neuling
2007-08-17 1:09 ` Michael Neuling
2007-08-17 18:59 ` Andrew Morton
2007-08-17 19:08 ` Balbir Singh
2007-08-19 8:56 ` Balbir Singh
2007-08-19 13:12 ` Michael Neuling
2007-08-16 16:38 ` Linas Vepstas [this message]
2007-08-16 22:22 ` Paul Mackerras
2007-08-17 17:10 ` Linas Vepstas
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=20070816163850.GU4261@austin.ibm.com \
--to=linas@austin.ibm.com \
--cc=akpm@osdl.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mikey@neuling.org \
--cc=paulus@samba.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).