xen-devel
Re: [Xen-devel] xen-4.1: PV domain hanging at startup, jiffies stopped
On 31.08.2011 23:01, Keir Fraser wrote:
> 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.
NOW() calls get_s_time() which doesn't look to be depended on tsc_mode
setting. Have I missed something?
> By how much have you seen guest and hypervisor disagree?
Adding printks in domU and hypervisor side using attached patches.
--
Pozdrawiam / Best Regards,
Marek Marczykowski | RLU #390519
marmarek at mimuw edu pl | xmpp:marmarek at staszic waw pl
debug-kernel-domU.diff
Description: Text document
debug-xen.diff
Description: Text document
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] xen-4.1: PV domain hanging at startup, jiffies stopped, Marek Marczykowski
- Re: [Xen-devel] xen-4.1: PV domain hanging at startup, jiffies stopped, Konrad Rzeszutek Wilk
- Re: [Xen-devel] xen-4.1: PV domain hanging at startup, jiffies stopped, Marek Marczykowski
- Re: [Xen-devel] xen-4.1: PV domain hanging at startup, jiffies stopped, Konrad Rzeszutek Wilk
- Re: [Xen-devel] xen-4.1: PV domain hanging at startup, jiffies stopped, Pasi Kärkkäinen
- Re: [Xen-devel] xen-4.1: PV domain hanging at startup, jiffies stopped, Marek Marczykowski
- Re: [Xen-devel] xen-4.1: PV domain hanging at startup, jiffies stopped, Marek Marczykowski
- RE: [Xen-devel] xen-4.1: PV domain hanging at startup, jiffies stopped, Dan Magenheimer
- Re: [Xen-devel] xen-4.1: PV domain hanging at startup, jiffies stopped, Marek Marczykowski
- Re: [Xen-devel] xen-4.1: PV domain hanging at startup, jiffies stopped, Keir Fraser
- Re: [Xen-devel] xen-4.1: PV domain hanging at startup, jiffies stopped,
Marek Marczykowski <=
- Re: [Xen-devel] xen-4.1: PV domain hanging at startup, jiffies stopped, Keir Fraser
|
|
|