weizhouapache commented on a change in pull request #4497:
URL: https://github.com/apache/cloudstack/pull/4497#discussion_r531034220
##########
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 this is the current behavior.
----------------------------------------------------------------
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]