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] xen-4.1: PV domain hanging at startup, jiffies stopped

To: Marek Marczykowski <marmarek@xxxxxxxxxxxx>, Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Subject: Re: [Xen-devel] xen-4.1: PV domain hanging at startup, jiffies stopped
From: Keir Fraser <keir.xen@xxxxxxxxx>
Date: Wed, 31 Aug 2011 22:01:52 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Joanna Rutkowska <joanna@xxxxxxxxxxxxxxxxxxxxxx>, Rafal Wojtczuk <rafal@xxxxxxxxxxxxxxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Delivery-date: Wed, 31 Aug 2011 14:04:30 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=VAKUQ5zLyJd5xjTiS9L5w3sPidnTMe4y9tbbHpErST4=; b=dlL66ougiLY9/MMwazjROA6O1wF50NVizX3mQPLMxHb8UxesiASdCVWBt+PRrYW5w8 m3sv3fPJK0T4UM2DO095rGH4y5uQlfYSyz8Rdb9TGNnO+vcFWjgb+uJ9QmOw4b24XPIy /NeL/YquiNAWO+mts9vIe3wrvBTcXfO5fcR8I=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4E5E9E69.7000600@xxxxxxxxxxxx>
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: AcxoITUK9k3Ih8H6OEO2Ax907AgEgw==
Thread-topic: [Xen-devel] xen-4.1: PV domain hanging at startup, jiffies stopped
User-agent: Microsoft-Entourage/12.30.0.110427
On 31/08/2011 21:49, "Marek Marczykowski" <marmarek@xxxxxxxxxxxx> wrote:

> xen_vcpuop_set_next_event schedules event by getting current time
> (xen_clocksource_read()) (*1) adding delta (expires-now) and programming
> event with VCPUOP_set_singleshot_timer hypercall. Then xen gets current
> time (*2) and in some rare cases this time is after expected timer
> expiration... Even after VCPUOP_set_singleshot_timer hypercal,
> xen_clocksource_read() reports time slightly in the past comparing to
> xen time (reported by NOW() macro).
> 
> I think this is because "current" time is calculated different way in *1
> and *2. The *1 way is controlled by tsc_mode, which is described here:
> http://lxr.xensource.com/lxr/source/docs/misc/tscmode.txt. Default
> tsc_mode=0 is "smart" and I think because of that can be slightly before
> NOW() time. tsc_mode=2 looks almost the same as NOW() macro works.
> 
> Is this reasoning correct?

They really ought to work out to the same thing. This will trivially be the
case with tsc_mode=2 because both guest and hypervisor will see the same
(real) values from RDTSC, and use the same offsets and sacle factors to turn
that into a current system time. When using emulated TSC in the guest
(tsc_mode=0,1) then the TSC values it sees, and the offsets and scale
factors it applies, are different. It is intended that it should result in
the same values being computed for NOW(), but I suppose something could be
going wrong there. By how much have you seen guest and hypervisor disagree?

 -- Keir



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