All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniil Tatianin <d-tatianin@yandex-team.ru>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Daniil Tatianin <d-tatianin@yandex-team.ru>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	yc-core@yandex-team.ru
Subject: [PATCH] kvm_host: bump KVM_MAX_IRQ_ROUTE to 128k
Date: Thu, 21 Mar 2024 11:24:42 +0300	[thread overview]
Message-ID: <20240321082442.195631-1-d-tatianin@yandex-team.ru> (raw)

We would like to be able to create large VMs (up to 224 vCPUs atm) with
up to 128 virtio-net cards, where each card needs a TX+RX queue per vCPU
for optimal performance (as well as config & control interrupts per
card). Adding in extra virtio-blk controllers with a queue per vCPU (up
to 192 disks) yields a total of about ~100k IRQ routes, rounded up to
128k for extra headroom and flexibility.

The current limit of 4096 was set in 2018 and is too low for modern
demands. It also seems to be there for no good reason as routes are
allocated lazily by the kernel anyway (depending on the largest GSI
requested by the VM).

Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
---
 include/linux/kvm_host.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 48f31dcd318a..10a141add2a8 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -2093,7 +2093,7 @@ static inline bool mmu_invalidate_retry_gfn_unsafe(struct kvm *kvm,
 
 #ifdef CONFIG_HAVE_KVM_IRQ_ROUTING
 
-#define KVM_MAX_IRQ_ROUTES 4096 /* might need extension/rework in the future */
+#define KVM_MAX_IRQ_ROUTES 131072 /* might need extension/rework in the future */
 
 bool kvm_arch_can_set_irq_routing(struct kvm *kvm);
 int kvm_set_irq_routing(struct kvm *kvm,
-- 
2.34.1


             reply	other threads:[~2024-03-21  8:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-21  8:24 Daniil Tatianin [this message]
2024-04-15  6:36 ` [PATCH] kvm_host: bump KVM_MAX_IRQ_ROUTE to 128k Daniil Tatianin

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=20240321082442.195631-1-d-tatianin@yandex-team.ru \
    --to=d-tatianin@yandex-team.ru \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=yc-core@yandex-team.ru \
    /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.