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


##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java:
##########
@@ -4262,6 +4263,9 @@ public StartupCommand[] initialize() {
                 new StartupRoutingCommand(info.getAllocatableCpus(), 
info.getCpuSpeed(), info.getTotalMemory(), info.getReservedMemory(), 
capabilities, hypervisorType,
                         RouterPrivateIpStrategy.HostLocal);
         cmd.setCpuSockets(info.getCpuSockets());
+        if (info.getCpuMaxSpeed() > 0) {
+            cmd.getHostDetails().put(HOST_CPU_MAX_SPEED_MHZ, 
String.valueOf(info.getCpuMaxSpeed()));

Review Comment:
   This is set in initialize() — runs once on agent connection. If a VM on this 
host has CPU cap enabled, the host cpuSpeed is used to calculate the quota. 
Since getCpuSpeed() also only refreshes on reconnect, both values share the 
same one-shot behavior. Is there any case where CPU max speed could diverge 
from cpuSpeed in a way that makes the detail misleading? E.g. a host with no 
turbo boost reported.



-- 
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