All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] xl: show full value of cpu_khz in xl info output
@ 2018-04-03 11:14 Olaf Hering
  2018-05-17 14:25 ` Olaf Hering
  0 siblings, 1 reply; 4+ messages in thread
From: Olaf Hering @ 2018-04-03 11:14 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Liu, Olaf Hering, Ian Jackson

The exact value of cpu_khz can only be obtained via 'xl dmesg', and
therefore can be lost after some time. 'xl info' truncates the value to
full MHz. Adjust the output to show the full khz value.
This helps the host admin to track how a host has calibrated itself. The
value of cpu_khz is used during live migration for the decision if
access to TSC should be emualted.

Commit eb5277a30e ("bitkeeper revision 1.959.1.4
(40d04a87acOb29u-5Y5OxMhHvP2x9g)" gives no hint why cpu_mhz instead of
cpu_khz was chosen.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
--
This is related to the suggested "vtsc_tolerance_khz=" change.
An alternative is to add another cpu_khz field and print the value verbatim.
---
 tools/xl/xl_info.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/xl/xl_info.c b/tools/xl/xl_info.c
index e9890ca5f2..6c8be26119 100644
--- a/tools/xl/xl_info.c
+++ b/tools/xl/xl_info.c
@@ -203,7 +203,7 @@ static void output_physinfo(void)
     maybe_printf("nr_nodes               : %d\n", info.nr_nodes);
     maybe_printf("cores_per_socket       : %d\n", info.cores_per_socket);
     maybe_printf("threads_per_core       : %d\n", info.threads_per_core);
-    maybe_printf("cpu_mhz                : %d\n", info.cpu_khz / 1000);
+    maybe_printf("cpu_mhz                : %d.%03d\n", info.cpu_khz / 1000, info.cpu_khz % 1000);
 
     maybe_printf("hw_caps                : %08x:%08x:%08x:%08x:%08x:%08x:%08x:%08x\n",
          info.hw_cap[0], info.hw_cap[1], info.hw_cap[2], info.hw_cap[3],

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] xl: show full value of cpu_khz in xl info output
  2018-04-03 11:14 [PATCH v1] xl: show full value of cpu_khz in xl info output Olaf Hering
@ 2018-05-17 14:25 ` Olaf Hering
  2018-05-17 14:31   ` Wei Liu
  0 siblings, 1 reply; 4+ messages in thread
From: Olaf Hering @ 2018-05-17 14:25 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Liu, Ian Jackson


[-- Attachment #1.1: Type: text/plain, Size: 556 bytes --]

Am Tue,  3 Apr 2018 13:14:11 +0200
schrieb Olaf Hering <olaf@aepfle.de>:

> The exact value of cpu_khz can only be obtained via 'xl dmesg', and
> therefore can be lost after some time. 'xl info' truncates the value to
> full MHz. Adjust the output to show the full khz value.
> This helps the host admin to track how a host has calibrated itself. The
> value of cpu_khz is used during live migration for the decision if
> access to TSC should be emualted.

I just found this in my backlog of unapplied patches.
Any word on this change?

Olaf

[-- Attachment #1.2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] xl: show full value of cpu_khz in xl info output
  2018-05-17 14:25 ` Olaf Hering
@ 2018-05-17 14:31   ` Wei Liu
  2018-05-18 10:01     ` Juergen Gross
  0 siblings, 1 reply; 4+ messages in thread
From: Wei Liu @ 2018-05-17 14:31 UTC (permalink / raw)
  To: Olaf Hering; +Cc: Juergen Gross, Wei Liu, Ian Jackson, xen-devel

On Thu, May 17, 2018 at 04:25:58PM +0200, Olaf Hering wrote:
> Am Tue,  3 Apr 2018 13:14:11 +0200
> schrieb Olaf Hering <olaf@aepfle.de>:
> 
> > The exact value of cpu_khz can only be obtained via 'xl dmesg', and
> > therefore can be lost after some time. 'xl info' truncates the value to
> > full MHz. Adjust the output to show the full khz value.
> > This helps the host admin to track how a host has calibrated itself. The
> > value of cpu_khz is used during live migration for the decision if
> > access to TSC should be emualted.
> 
> I just found this in my backlog of unapplied patches.
> Any word on this change?

Acked-by: Wei Liu <wei.liu2@citrix.com>

Sorry I missed this one.

CC Juergen, I think this should be in 4.11.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] xl: show full value of cpu_khz in xl info output
  2018-05-17 14:31   ` Wei Liu
@ 2018-05-18 10:01     ` Juergen Gross
  0 siblings, 0 replies; 4+ messages in thread
From: Juergen Gross @ 2018-05-18 10:01 UTC (permalink / raw)
  To: Wei Liu, Olaf Hering; +Cc: Ian Jackson, xen-devel

On 17/05/18 16:31, Wei Liu wrote:
> On Thu, May 17, 2018 at 04:25:58PM +0200, Olaf Hering wrote:
>> Am Tue,  3 Apr 2018 13:14:11 +0200
>> schrieb Olaf Hering <olaf@aepfle.de>:
>>
>>> The exact value of cpu_khz can only be obtained via 'xl dmesg', and
>>> therefore can be lost after some time. 'xl info' truncates the value to
>>> full MHz. Adjust the output to show the full khz value.
>>> This helps the host admin to track how a host has calibrated itself. The
>>> value of cpu_khz is used during live migration for the decision if
>>> access to TSC should be emualted.
>>
>> I just found this in my backlog of unapplied patches.
>> Any word on this change?
> 
> Acked-by: Wei Liu <wei.liu2@citrix.com>
> 
> Sorry I missed this one.
> 
> CC Juergen, I think this should be in 4.11.

Release-acked-by: Juergen Gross <jgross@suse.com>


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-05-18 10:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-03 11:14 [PATCH v1] xl: show full value of cpu_khz in xl info output Olaf Hering
2018-05-17 14:25 ` Olaf Hering
2018-05-17 14:31   ` Wei Liu
2018-05-18 10:01     ` Juergen Gross

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.