[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Debian stable kernel got timer issue when running as PV guest

On Fri, Apr 13, 2012 at 9:10 AM, David Vrabel <david.vrabel@xxxxxxxxxx> wrote:
On 13/04/12 12:00, Jan Beulich wrote:
>>>> On 13.04.12 at 12:37, David Vrabel <dvrabel@xxxxxxxxxx> wrote:
>> On 13/04/12 08:56, Jan Beulich wrote:
>>>>>> On 12.04.12 at 21:22, Sheng Yang <sheng@xxxxxxxxxx> wrote:
>>>> I've compiled a kernel, force sched_clock_stable=0, then it solved the
>>>> timestamp jump issue as expected. Luckily, seems it also solved the call
>>>> trace and guest hang issue as well.
>>> And this is also how it should be fixed.
>> Something like this?  I've not tested it yet as I need to track down
>> some of the problem hardware and get it set up.
> Yeah, except that I'm not sure you really need to clear the feature
> flags. Just making sure sched_clock_stable never gets set should be
> enough; playing with the feature flags always implies that users will
> see bigger differences in /proc/cpuinfo between native and Xen
> kernels...

I have a system with both NONSTOP_TSC and CONSTANT_TSC so
sched_clock_stable should be true.  VMs start and migrate fine with no
unexpected jumps in time.  I think more digging is required here to find
out why time is screwy on this particular system.

That's the reason I said there should be another (kernel) bug, triggered by this. In the original mail, I've already said on our Sandy Bridge machine, I can only reproduce the timestamp of printk jump issue, but not the migration hang.

Did you see the timestamp jump on the PV guest?

Yang, Sheng


>> 8<---------------
>> xen: always set the sched clock as unstable
>> It's not clear to me if the Xen clock source can be used as a stable
>> sched clock. Also, even if the guest is started on a system whose
>> underying TSC is stable it may be migrated to one where it's not. So
>> never mark the sched clock as stable.
>> Signed-off-by: David Vrabel <david.vrabel@xxxxxxxxxx>
>> ---
>>  arch/x86/xen/time.c |    3 +++
>>  1 files changed, 3 insertions(+), 0 deletions(-)
>> diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
>> index 0296a95..b22cd9c 100644
>> --- a/arch/x86/xen/time.c
>> +++ b/arch/x86/xen/time.c
>> @@ -473,6 +473,9 @@ static void __init xen_time_init(void)
>>      do_settimeofday(&tp);
>>      setup_force_cpu_cap(X86_FEATURE_TSC);
>> +    setup_clear_cpu_cap(X86_FEATURE_CONSTANT_TSC);
>> +    setup_clear_cpu_cap(X86_FEATURE_NONSTOP_TSC);
>> +    sched_clock_stable = 0;
>>      xen_setup_runstate_info(cpu);
>>      xen_setup_timer(cpu);

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.