public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Zhenzhong Duan <zhenzhong.duan@oracle.com>,
	linux-x86_64@vger.kernel.org, linux-kernel@vger.kernel.org,
	xen-devel@lists.xensource.com
Subject: Re: [PATCH] cpu idle ticks show twice in xen pvm guest
Date: Mon, 10 Oct 2011 13:00:09 -0700	[thread overview]
Message-ID: <4E934EC9.5030909@goop.org> (raw)
In-Reply-To: <20111010155319.GA29140@phenom.oracle.com>

On 10/10/2011 08:53 AM, Konrad Rzeszutek Wilk wrote:
> On Wed, Oct 05, 2011 at 10:11:58PM -0700, Zhenzhong Duan wrote:
>> Run below test on xen pvm.
>> # x=$(cat /proc/stat | grep cpu0 | awk '{print $5}') && sleep 60  \
>> && y=$(cat /proc/stat | grep cpu0 | awk '{print $5}') \
>> && echo -e  "X:$x\nY:$y\nIDLE:" $(echo "scale=3; ($y-$x)/6000*100" | bc)
>>
>> @ X:58562301
>> @ Y:58574282
>> @ IDLE: 199.600
>>
>> Normal idle percent should be around 100%.
>> xen_timer_interrupt called account_idle_ticks to account hypervisor stolen idle ticks 
>> but these ticks will be accounted again when idle ticks restarted.
>>
>> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
>> Signed-off-by: Joe Jin <joe.jin@oracle.com>
> Please in the future also CC the maintainers (you can get that using
> the scripts/get_maintainer.pl).
>
> Jeremy, any thoughts?

Does this affect the accounting of stolen ticks?  If it does, that's not
necessarily a showstopper for this patch, but we'll need to do some more
thinking about it.  Certainly, accurate accounting for idleness is
important.

    J

>> diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
>> index 163b467..5dcbc91 100644
>> --- a/arch/x86/xen/time.c
>> +++ b/arch/x86/xen/time.c
>> @@ -151,7 +151,6 @@ static void do_stolen_accounting(void)
>>  
>>  	ticks = iter_div_u64_rem(blocked, NS_PER_TICK, &blocked);
>>  	__this_cpu_write(xen_residual_blocked, blocked);
>> -	account_idle_ticks(ticks);
>>  }
>>  
>>  /* Get the TSC speed from Xen */
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at  http://www.tux.org/lkml/


  reply	other threads:[~2011-10-10 20:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-06  5:11 [PATCH] cpu idle ticks show twice in xen pvm guest Zhenzhong Duan
2011-10-10 15:53 ` Konrad Rzeszutek Wilk
2011-10-10 20:00   ` Jeremy Fitzhardinge [this message]
2011-10-11  3:16     ` DuanZhenzhong
2011-12-09 15:47     ` Ferenc Wagner
2011-12-17 21:46       ` Konrad Rzeszutek Wilk
2011-12-19 17:53         ` Ferenc Wagner

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=4E934EC9.5030909@goop.org \
    --to=jeremy@goop.org \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-x86_64@vger.kernel.org \
    --cc=xen-devel@lists.xensource.com \
    --cc=zhenzhong.duan@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox