From: You-Sheng Yang <vicamo@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
x86@kernel.org, Pavel Tatashin <pasha.tatashin@oracle.com>,
Peter Zijlstra <peterz@infradead.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Dou Liyang <douly.fnst@cn.fujitsu.com>,
Daniel Vacek <neelx@redhat.com>,
Mike Travis <mike.travis@hpe.com>,
Xiaoming Gao <gxm.linux.kernel@gmail.com>,
You-Sheng Yang <vicamo.yang@canonical.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Chuanhua Lei <chuanhua.lei@linux.intel.com>,
Juergen Gross <jgross@suse.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/tsc: mark tsc reliable on CoffeeLake
Date: Wed, 10 Apr 2019 16:11:53 +0800 [thread overview]
Message-ID: <b37e870c-033d-61ca-7993-48f9105e2ec6@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1904081403220.1748@nanos.tec.linutronix.de>
On 2019/4/8 8:03 PM, Thomas Gleixner wrote:
> On Mon, 8 Apr 2019, You-Sheng Yang wrote:
>
>> From: You-Sheng Yang <vicamo.yang@canonical.com>
>>
>> On Intel CoffeeLake it's observed tsc is always marked unstable
>> unexpectedly after entering idle state Package C10(PC10), and then clock
>> source is switched to hpet. This patch marks tsc as reliable when CPUID
>> matches CoffeeLake.
>
> This lacks a proper analysis:
>
> 1) Why is it marked unstable
Usually the differences between wd_nsec and cs_nsec in function
clocksource_watchdog in kernel/time/clocksource.c would be less than a
few thousand nanoseconds. However, when CPU is entering deeper idle
state, PC10, the hpet clocksource readings starts to give inaccurate
values for unknown reason, and the differences to cs_nsec varies from a
few hundred nanoseconds to several hundred millisecond, which is larger
than WATCHDOG_THRESHOLD (62.5ms) and finally results in tsc being marked
unreliable. No HPET overflow is found when this occurs.
> 2) Why is it correct to set that for coffeelake
So far this strange behaviour is only found on coffeelake. Besides this,
no much I can tell actually. This could be probably wrong, but may serve
as a start to bring up some more discussion/investigation to solve the
problem. I would be more than willing to help verifying further
appropriate fixes.
Thank you.
You-Sheng Yang
next prev parent reply other threads:[~2019-04-10 8:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-08 10:40 [PATCH] x86/tsc: mark tsc reliable on CoffeeLake You-Sheng Yang
2019-04-08 12:03 ` Thomas Gleixner
2019-04-10 8:11 ` You-Sheng Yang [this message]
2019-04-12 3:28 ` You-Sheng Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b37e870c-033d-61ca-7993-48f9105e2ec6@gmail.com \
--to=vicamo@gmail.com \
--cc=bp@alien8.de \
--cc=chuanhua.lei@linux.intel.com \
--cc=douly.fnst@cn.fujitsu.com \
--cc=gxm.linux.kernel@gmail.com \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.travis@hpe.com \
--cc=mingo@redhat.com \
--cc=neelx@redhat.com \
--cc=pasha.tatashin@oracle.com \
--cc=peterz@infradead.org \
--cc=rafael.j.wysocki@intel.com \
--cc=tglx@linutronix.de \
--cc=vicamo.yang@canonical.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox