All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: James Dingwall <james-xen@dingwall.me.uk>
Cc: alexander.rossa@ncr.com, xen-devel@lists.xenproject.org
Subject: Re: xen 4.14.3 incorrect (~3x) cpu frequency reported
Date: Thu, 6 Jan 2022 17:00:59 +0100	[thread overview]
Message-ID: <76c0e41b-f0a0-60e5-f2b4-d19724ee2db2@suse.com> (raw)
In-Reply-To: <20220106150809.GA856484@dingwall.me.uk>

On 06.01.2022 16:08, James Dingwall wrote:
>>> On Wed, Jul 21, 2021 at 12:59:11PM +0200, Jan Beulich wrote:                                                                            
>>>> On 21.07.2021 11:29, James Dingwall wrote:                                                                                             
>>>>> We have a system which intermittently starts up and reports an incorrect cpu frequency:                                               
> ...
>>> I'm sorry to ask, but have you got around to actually doing that? Or
>>> else is resolving this no longer of interest?
> 
> We have experienced an occurence of this issue on 4.14.3 with 'loglvl=all'
> present on the xen command line.  I have attached the 'xl dmesg' output for
> the fast MHz boot, the diff from the normal case is small so I've not added
> that log separately:
> 
> --- normal-mhz/xl-dmesg.txt     2022-01-06 14:13:47.231465234 +0000
> +++ funny-mhz/xl-dmesg.txt      2022-01-06 13:45:43.825148510 +0000
> @@ -211,7 +211,7 @@
>  (XEN)  cap enforcement granularity: 10ms
>  (XEN) load tracking window length 1073741824 ns
>  (XEN) Platform timer is 24.000MHz HPET
> -(XEN) Detected 2294.639 MHz processor.
> +(XEN) Detected 7623.412 MHz processor.
>  (XEN) EFI memory map:
>  (XEN)  0000000000000-0000000007fff type=3 attr=000000000000000f
>  (XEN)  0000000008000-000000003cfff type=7 attr=000000000000000f
> @@ -616,6 +616,7 @@
>  (XEN) PCI add device 0000:b7:00.1
>  (XEN) PCI add device 0000:b7:00.2
>  (XEN) PCI add device 0000:b7:00.3
> +(XEN) Platform timer appears to have unexpectedly wrapped 10 or more times.
>  (XEN) [VT-D]d0:PCIe: unmap 0000:65:00.2
>  (XEN) [VT-D]d32753:PCIe: map 0000:65:00.2
>  (XEN) [VT-D]d0:PCIe: unmap 0000:65:00.1

Thanks. In an earlier mail the reported value was 6895.384 MHz, but I
guess that was on a different system (with a base freq of 2200 MHz).
I wonder how stable the too high value is ...

For the moment I have only one possibly explanation: A SMI hitting in
the middle of the tail of init_hpet() (or init_pmtimer()), taking long
enough to cause the function to return way too large a number. With a
50ms calibration period that would be about 166ms. I vaguely recall
having heard of SMI potentially taking this long.

While I can see ways to reduce the likelihood of hitting the issue,
for now I lack a good idea how to avoid the problem altogether. I'll
try to get around to at least put together a debugging patch to
hopefully confirm the vague theory.

Jan

> I also have the dom0 kernel dmesg available if that would be useful but I've
> left it off initially because the log is quite large.  I don't see much in
> the diff between boots except where speed/times are reported and where things
> are initialised in a slightly different order.
> 
> Thanks,
> James



  reply	other threads:[~2022-01-06 16:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-21  9:29 xen 4.11.4 incorrect (~3x) cpu frequency reported James Dingwall
2021-07-21 10:59 ` Jan Beulich
2021-07-26 12:33   ` James Dingwall
2021-11-05 12:50     ` Jan Beulich
2021-11-05 15:25       ` James Dingwall
2022-01-06 15:08         ` xen 4.14.3 " James Dingwall
2022-01-06 16:00           ` Jan Beulich [this message]
2022-01-07 11:51             ` Andrew Cooper
2022-01-07 11:39           ` Jan Beulich
2022-01-07 16:37             ` James Dingwall
2022-01-10  7:52             ` Jan Beulich
2022-01-10 14:49               ` Roger Pau Monné
2022-01-10 15:04                 ` Jan Beulich
2022-01-10 12:37             ` Roger Pau Monné
2022-01-10 13:11               ` Jan Beulich
2022-01-10 15:43                 ` Andrew Cooper
2022-01-10 17:04                   ` Jan Beulich
2022-01-11  5:32                     ` Juergen Gross
2022-01-11  7:09                       ` Jan Beulich
2022-01-11  7:23                     ` Jan Beulich
2022-01-12 16:55               ` Jan Beulich

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=76c0e41b-f0a0-60e5-f2b4-d19724ee2db2@suse.com \
    --to=jbeulich@suse.com \
    --cc=alexander.rossa@ncr.com \
    --cc=james-xen@dingwall.me.uk \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.