All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2] KVM/x86: Increase max vcpu number to 8192
@ 2017-08-16  0:43 Lan Tianyu
  2017-08-21 15:52 ` Radim Krčmář
  0 siblings, 1 reply; 2+ messages in thread
From: Lan Tianyu @ 2017-08-16  0:43 UTC (permalink / raw)
  Cc: Lan Tianyu, pbonzini, rkrcmar, tglx, mingo, hpa, x86, kvm, linux-kernel

For HPC usage case, it will create a huge VM with vcpus number as same as host
cpus and this requires more vcpus support in a single VM. This patch is to
increase max vcpu number from 288 to 8192 which is current default maximum cpu
number for Linux kernel.

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
---
 arch/x86/include/asm/kvm_host.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 87ac4fb..7946394 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -35,7 +35,7 @@
 #include <asm/asm.h>
 #include <asm/kvm_page_track.h>
 
-#define KVM_MAX_VCPUS 288
+#define KVM_MAX_VCPUS 8192
 #define KVM_SOFT_MAX_VCPUS 240
 #define KVM_MAX_VCPU_ID 1023
 #define KVM_USER_MEM_SLOTS 509
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH V2] KVM/x86: Increase max vcpu number to 8192
  2017-08-16  0:43 [PATCH V2] KVM/x86: Increase max vcpu number to 8192 Lan Tianyu
@ 2017-08-21 15:52 ` Radim Krčmář
  0 siblings, 0 replies; 2+ messages in thread
From: Radim Krčmář @ 2017-08-21 15:52 UTC (permalink / raw)
  To: Lan Tianyu; +Cc: pbonzini, tglx, mingo, hpa, x86, kvm, linux-kernel

2017-08-15 20:43-0400, Lan Tianyu:
> For HPC usage case, it will create a huge VM with vcpus number as same as host
> cpus and this requires more vcpus support in a single VM. This patch is to
> increase max vcpu number from 288 to 8192 which is current default maximum cpu
> number for Linux kernel.
> 
> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
> ---
> diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> @@ -35,7 +35,7 @@
>  #include <asm/asm.h>
>  #include <asm/kvm_page_track.h>
>  
> -#define KVM_MAX_VCPUS 288
> +#define KVM_MAX_VCPUS 8192
>  #define KVM_SOFT_MAX_VCPUS 240
>  #define KVM_MAX_VCPU_ID 1023

We will also need to raise KVM_MAX_VCPU_ID to actually allow that many
VCPUs.  If I count correctly, it is impossible to have ID bigger than
this:

 #define KVM_MAX_VCPU_ID (KVM_MAX_VCPUS * 4)

(And we can also use NR_CPUS instead of 8192.)

Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-21 15:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-16  0:43 [PATCH V2] KVM/x86: Increase max vcpu number to 8192 Lan Tianyu
2017-08-21 15:52 ` Radim Krčmář

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.