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

Re: [Xen-devel] [PATCH] Fix performance issue brought by TSC-sync logic

To: "Yang, Xiaowei" <xiaowei.yang@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Fix performance issue brought by TSC-sync logic
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Mon, 23 Feb 2009 04:51:48 -0800
Cc:
Delivery-date: Mon, 23 Feb 2009 04:52:20 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <49A25C73.6090702@xxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcmVj9H4CKvdffx+T2Cpkh8WlwbQFQAJatNS
Thread-topic: [Xen-devel] [PATCH] Fix performance issue brought by TSC-sync logic
User-agent: Microsoft-Entourage/12.15.0.081119
On 23/02/2009 00:21, "Yang, Xiaowei" <xiaowei.yang@xxxxxxxxx> wrote:

> Recently we found one performance bug when doing network test with VTd
> assigned devices - in some extreme case, the network performance in HVM
> using new Linux kernel could be 1/20 of native. Root cause is one of our
> sync-tsc-under-deep-C-state patches brings extra kilo-TSC drift between
> pCPUs and let check-tsc-sync logic in HVM failed. The result is the
> kernel fails to use platform timer (HPET, PMtimer) for gettimeofday
> instead of TSC and brings very frequent costly IOport access VMExit -
> triple per one call.
> 
> We provides below 2 patches to address the issue:

Patch 1 looks reasonable. Patch number 2 I'm less keen on, since patch 1
should suffice? Also I think regular re-sync across CPUs is a good idea
anyway. And that also reminds me -- isn't the CONSTANT_TSC logic in time.c
broken by host S3, and also by CPU hotplug? There's nothing to force sync of
AP TSC to BP TSC when an AP comes online after boot. Doesn't
init_percpu_time() need to handle that?

 -- Keir



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