All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: Kyle Meyer <kyle.meyer@hpe.com>,
	bp@alien8.de, dave.hansen@linux.intel.com, dmatlack@google.com,
	hpa@zytor.com, jmattson@google.com, joro@8bytes.org,
	kvm@vger.kernel.org, mingo@redhat.com, payton@hpe.com,
	russ.anderson@hpe.com, steve.wahl@hpe.com, tglx@linutronix.de,
	wanpengli@tencent.com, x86@kernel.org
Subject: Re: [PATCH v2] KVM: x86: Increase KVM_MAX_VCPUS to 4096
Date: Thu, 7 Jul 2022 17:03:39 +0000	[thread overview]
Message-ID: <YscR673z61Z/VW7F@google.com> (raw)
In-Reply-To: <87r136shcc.fsf@redhat.com>

On Thu, Jun 30, 2022, Vitaly Kuznetsov wrote:
> Kyle Meyer <kyle.meyer@hpe.com> writes:
> 
> > Increase KVM_MAX_VCPUS to 4096 when the maximum number of supported CPUs
> > (NR_CPUS) is greater than 1024.

Changelog says "greater than 1024", code says "at least 1024". 

> > The Hyper-V TLFS doesn't allow more than 64 sparse banks, which allows a
> > maximum of 4096 virtual CPUs. Limit KVM's maximum number of virtual CPUs
> > to 4096 to avoid exceeding that limit.
> 
> In theory, it's just TLB flush and IPI hypercalls which have this
> limitation. Strictly speaking, guest can have more than 4096 vCPUs,
> it'll just have to do IPIs/TLB flush in a different way.

Yeah, I don't see any reason to arbitrarily limit this to 4096.  And conversely,
I don't see any reason to force it to 4096 if NR_CPUS < 4096, it seems highly
unlikely that there's a use case for oversubscribing vCPUs in a single VM when
there are more than 1024 pCPUs.

      reply	other threads:[~2022-07-07 17:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13 14:50 [PATCH] KVM: x86: Increase KVM_MAX_VCPUS to 2048 Kyle Meyer
2022-06-13 15:19 ` Vitaly Kuznetsov
2022-06-13 20:24 ` David Matlack
2022-06-14  8:27   ` Vitaly Kuznetsov
2022-06-16 16:47     ` David Matlack
2022-06-16 16:58       ` Sean Christopherson
2022-06-29 20:38         ` [PATCH v2] KVM: x86: Increase KVM_MAX_VCPUS to 4096 Kyle Meyer
2022-06-30  8:09           ` Vitaly Kuznetsov
2022-07-07 17:03             ` Sean Christopherson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YscR673z61Z/VW7F@google.com \
    --to=seanjc@google.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=dmatlack@google.com \
    --cc=hpa@zytor.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=kyle.meyer@hpe.com \
    --cc=mingo@redhat.com \
    --cc=payton@hpe.com \
    --cc=russ.anderson@hpe.com \
    --cc=steve.wahl@hpe.com \
    --cc=tglx@linutronix.de \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.