WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH] cpu idle ticks show twice in xen pvm guest

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] cpu idle ticks show twice in xen pvm guest
From: DuanZhenzhong <zhenzhong.duan@xxxxxxxxxx>
Date: Tue, 11 Oct 2011 11:16:42 +0800
Cc: linux-kernel@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, Joe Jin <joe.jin@xxxxxxxxxx>, linux-x86_64@xxxxxxxxxxxxxxx, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Delivery-date: Mon, 10 Oct 2011 20:16:30 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4E934EC9.5030909@xxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Oracle Corporation
References: <ce19ea02-45e6-465a-a4c8-b5d74bf8c2ad@default> <20111010155319.GA29140@xxxxxxxxxxxxxxxxx> <4E934EC9.5030909@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.24 (X11/20101209)
Jeremy Fitzhardinge wrote:
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@xxxxxxxxxx>
Signed-off-by: Joe Jin <joe.jin@xxxxxxxxxx>
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

Thanks Konrad for point out that.
In Original kernel, tick_nohz_restart_sched_tick and do_stolen_accounting both called account_idle_ticks.
For a idle pvm, idle/iowait maybe doubled apparently.
Normally Y-X should get close to 6000 in idle system, but in my test it's 11981.
But I am still not sure if patch has any impact to other part. Thanks
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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



--
Regards
zhenzhong
--
Oracle Building, No.24 Building, Zhongguancun Software Park
Haidian District, Beijing 100193, China


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>