xl: show full value of cpu_khz in xl info output
PATCH 1/1 xl: show full value of cpu_khz in xl info output
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.
--
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(-)
tools/xl/xl_info.c +1 -1
@@ -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
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Am Tue, 3 Apr 2018 13:14:11 +0200
schrieb Olaf Hering <[email protected]>:
Quoted 6 lines
The exact value of
cpu_khzcan 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 ofcpu_khzis 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
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Wei Liu
Acked-byQuoted 10 lines · Olaf Hering
Am Tue, 3 Apr 2018 13:14:11 +0200
schrieb Olaf Hering <[email protected]>:Quoted 6 lines
The exact value of
cpu_khzcan 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 ofcpu_khzis used during live migration for the decision if access to TSC should be emualted.
Quoted 2 lines
I just found this in my backlog of unapplied patches. Any word on this change?
Sorry I missed this one.
CC Juergen, I think this should be in 4.11.
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 11 lines · Wei Liu
Quoted 10 lines · Olaf Hering
Am Tue, 3 Apr 2018 13:14:11 +0200
schrieb Olaf Hering <[email protected]>:Quoted 6 lines
The exact value of
cpu_khzcan 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 ofcpu_khzis used during live migration for the decision if access to TSC should be emualted.
Quoted 8 lines
Quoted 2 lines
I just found this in my backlog of unapplied patches. Any word on this change?
Acked-by Wei Liu <[email protected]>Sorry I missed this one.
CC Juergen, I think this should be in 4.11.
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel