sureshanaparti commented on a change in pull request #4497:
URL: https://github.com/apache/cloudstack/pull/4497#discussion_r533089630



##########
File path: 
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
##########
@@ -4230,4 +4223,26 @@ public boolean isSecureMode(String bootMode) {
 
         return false;
     }
+
+    private void setCpuTopology(CpuModeDef cmd, int vcpus, Map<String, String> 
details) {
+        // multi cores per socket, for larger core configs
+        int numCoresPerSocket = -1;
+        if (details != null) {
+            final String coresPerSocket = 
details.get(VmDetailConstants.CPU_CORE_PER_SOCKET);
+            final int intCoresPerSocket = NumbersUtil.parseInt(coresPerSocket, 
numCoresPerSocket);
+            if (intCoresPerSocket > 0 && vcpus % intCoresPerSocket == 0) {
+                numCoresPerSocket = intCoresPerSocket;
+            }
+        }
+        if (numCoresPerSocket <= 0) {
+            if (vcpus % 6 == 0) {
+                numCoresPerSocket = 6;
+            } else if (vcpus % 4 == 0) {

Review comment:
       > @sureshanaparti you mean change the current behavior ? No. I am not 
going to change it
   > It worked since cloudstack 4.13 in commit 
[2f53295](https://github.com/apache/cloudstack/commit/2f53295151820c56c683ed280691ebd479d25ec2)
   > https://issues.apache.org/jira/browse/CLOUDSTACK-5521
   
   ok @weizhouapache so no change in the behavior. thanks.




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

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


Reply via email to