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

[Xen-changelog] [xen master] xl: show full value of cpu_khz in xl info output



commit e0414f4223bd9b7ce9d07c9f26dd129a79c6d4cc
Author:     Olaf Hering <olaf@xxxxxxxxx>
AuthorDate: Tue Apr 3 13:14:11 2018 +0200
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Fri May 18 17:23:56 2018 +0100

    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.
    
    Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Release-acked-by: Juergen Gross <jgross@xxxxxxxx>
---
 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],
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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