Damans227 commented on code in PR #14384:
URL: https://github.com/apache/cloudstack/pull/14384#discussion_r4258705849


##########
plugins/hypervisors/kvm/src/main/java/org/apache/cloudstack/utils/linux/KVMHostInfo.java:
##########
@@ -114,59 +132,100 @@ public static boolean isHostS390x() {
        return "s390x".equals(System.getProperty("os.arch"));
     }
 
-    protected static long getCpuSpeed(final String cpabilities, final NodeInfo 
nodeInfo) {
-        long speed = 0L;
-        speed = getCpuSpeedFromCommandLscpu();
-        if(speed > 0L) {
+    protected static long getCpuSpeed(final String lscpuOutput, final String 
capabilities, final NodeInfo nodeInfo) {
+        long speed = getBaseCpuSpeedFromLscpuOutput(lscpuOutput);
+        if (speed > 0L) {
             return speed;
         }
 
         speed = getCpuSpeedFromFile();

Review Comment:
   with the amd-pstate driver isnt scaling_max_freq the turbo speed too? looks 
like newer epyc hosts would still end up with the turbo value here



##########
plugins/hypervisors/kvm/src/main/java/org/apache/cloudstack/utils/linux/KVMHostInfo.java:
##########
@@ -213,11 +272,13 @@ private void getHostInfoFromLibvirt() {
             final Connect conn = LibvirtConnection.getConnection();
             final NodeInfo hosts = conn.nodeInfo();
             final String capabilities = conn.getCapabilities();
+            final String lscpuOutput = getLscpuOutput();
             if (this.cpuSpeed == 0) {
-                this.cpuSpeed = getCpuSpeed(capabilities, hosts);
+                this.cpuSpeed = getCpuSpeed(lscpuOutput, capabilities, hosts);

Review Comment:
   what happens to existing vms on amd hosts after the upgrade? if their 
offering speed is above the new lower host speed they wont fit on that host 
anymore when they restart or migrate



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to