linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Neuling <mikey@neuling.org>
To: balbir@linux.vnet.ibm.com
Cc: Andrew Morton <akpm@osdl.org>,
	linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] Add scaled time to taskstats based process accounting
Date: Fri, 17 Aug 2007 14:56:44 +1000	[thread overview]
Message-ID: <13853.1187326604@neuling.org> (raw)
In-Reply-To: <46C52872.9060408@linux.vnet.ibm.com>

In message <46C52872.9060408@linux.vnet.ibm.com> you wrote:
> Michael Neuling wrote:
> >> I'd also request for you to add a cpu_scaled_run_real_total for use
> >> by delay accounting. cpu_scaled_run_real_total should be similar in
> >> functionality to cpu_run_real_total.
> > 
> > Will do.  Should I add cpu_scaled_run_real_total to the end of the
> > struct taskstat, or next to cpu_run_real_total?
> > 
> 
> Please add it to the end, that helps maintain binary compatibility
> across all versions of taskstats.

OK

> 
> >>>  	/* Note: this timer irq context must be accounted for as well. */
> >>> -	if (user_tick)
> >>> +	if (user_tick) {
> >>>  		account_user_time(p, jiffies_to_cputime(1));
> >>> -	else
> >>> +		account_user_time_scaled(p, jiffies_to_cputime(1));
> >>> +	} else {
> >>>  		account_system_time(p, HARDIRQ_OFFSET, jiffies_to_cputime(1));
> >>> +		account_system_time_scaled(p, jiffies_to_cputime(1));
> >>> +	}
> >> I am a little confused here, scaled accounting and regular accounting
> >> go hand in hand?
> > 
> > We need to account for scaled and normal time in this generic code.
> > All other calls to account_(user|system)_time are in arch code.  
> > 
> 
> So the assumption here is that we ran at full frequency during
> this time, is my understanding correct?

Yes.  

I guess we could keep a per CPU last scaling factor for this case
(similar to what we are storing in the POWERPC paca)

Mikey

  reply	other threads:[~2007-08-17  4:56 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 [this message]
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
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=13853.1187326604@neuling.org \
    --to=mikey@neuling.org \
    --cc=akpm@osdl.org \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.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).