All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Friesen <chris.friesen@windriver.com>
To: lkml <linux-kernel@vger.kernel.org>,
	Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: question about logic of steal_account_process_tick() ?
Date: Fri, 4 Mar 2016 14:47:24 -0600	[thread overview]
Message-ID: <56D9F45C.5050602@windriver.com> (raw)
In-Reply-To: <56D9E72D.5060308@windriver.com>

On 03/04/2016 01:51 PM, Chris Friesen wrote:

> The thing is, steal_account_process_tick() returns units of cputime, which I
> think is nanoseconds on x86_64.  So if we have a tiny amount of stolen time it
> seems like that will prevent a whole tick from being accounted into
> user/system/idle.
>
> I feel like I must be missing something here, can someone tell me what it is?

Looking at commit dee08a72 (from 2014) it seems like the units of the return 
value of steal_account_process_tick() changed from ticks to cputime_t.  I don't 
see an equivalent change in the logic in account_process_tick(), which seems to 
assume that a nonzero return value in steal_account_process_tick() means a whole 
tick has been stolen.

Was there a change to make paravirt_steal_clock() increment in ticks?  If not it 
seems like there's a unit mismatch here.

Chris

      reply	other threads:[~2016-03-04 20:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-04 19:51 question about logic of steal_account_process_tick() ? Chris Friesen
2016-03-04 20:47 ` Chris Friesen [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=56D9F45C.5050602@windriver.com \
    --to=chris.friesen@windriver.com \
    --cc=fweisbec@gmail.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 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.