All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Yi Wang <up2wing@gmail.com>
Cc: pbonzini@redhat.com, tglx@linutronix.de, mingo@redhat.com,
	bp@alien8.de,  dave.hansen@linux.intel.com, x86@kernel.org,
	hpa@zytor.com,  kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org, wanpengli@tencent.com,
	 foxywang@tencent.com, oliver.upton@linux.dev, maz@kernel.org,
	 anup@brainfault.org, atishp@atishpatra.org,
	borntraeger@linux.ibm.com,  frankja@linux.ibm.com,
	imbrenda@linux.ibm.com, weijiang.yang@intel.com
Subject: Re: [v5 2/3] KVM: x86: don't setup empty irq routing when KVM_CAP_SPLIT_IRQCHIP
Date: Mon, 10 Jun 2024 17:25:18 -0700	[thread overview]
Message-ID: <ZmeZbjFi5FWxv-Mb@google.com> (raw)
In-Reply-To: <20240506101751.3145407-3-foxywang@tencent.com>

On Mon, May 06, 2024, Yi Wang wrote:
> From: Yi Wang <foxywang@tencent.com>
> 
> We found that it may cost more than 20 milliseconds very accidentally
> to enable cap of KVM_CAP_SPLIT_IRQCHIP on a host which has many vms
> already.
> 
> The reason is that when vmm(qemu/CloudHypervisor) invokes
> KVM_CAP_SPLIT_IRQCHIP kvm will call synchronize_srcu_expedited() and
> might_sleep and kworker of srcu may cost some delay during this period.
> 
> As we have set up empty irq routing when creating vm, so this is no
> need now.
> 
> Signed-off-by: Yi Wang <foxywang@tencent.com>
> ---
>  arch/x86/kvm/irq.h      | 1 -
>  arch/x86/kvm/irq_comm.c | 5 -----
>  arch/x86/kvm/x86.c      | 3 ---
>  3 files changed, 9 deletions(-)
> 
> diff --git a/arch/x86/kvm/irq.h b/arch/x86/kvm/irq.h
> index c2d7cfe82d00..76d46b2f41dd 100644
> --- a/arch/x86/kvm/irq.h
> +++ b/arch/x86/kvm/irq.h
> @@ -106,7 +106,6 @@ void __kvm_migrate_timers(struct kvm_vcpu *vcpu);
>  int apic_has_pending_timer(struct kvm_vcpu *vcpu);
>  
>  int kvm_setup_default_irq_routing(struct kvm *kvm);
> -int kvm_setup_empty_irq_routing(struct kvm *kvm);
>  int kvm_irq_delivery_to_apic(struct kvm *kvm, struct kvm_lapic *src,
>  			     struct kvm_lapic_irq *irq,
>  			     struct dest_map *dest_map);
> diff --git a/arch/x86/kvm/irq_comm.c b/arch/x86/kvm/irq_comm.c
> index 68f3f6c26046..6ee7ca39466e 100644
> --- a/arch/x86/kvm/irq_comm.c
> +++ b/arch/x86/kvm/irq_comm.c
> @@ -397,11 +397,6 @@ int kvm_setup_default_irq_routing(struct kvm *kvm)
>  
>  static const struct kvm_irq_routing_entry empty_routing[] = {};

empty_routing is unused after this patch and can+should be removed, e.g.

arch/x86/kvm/irq_comm.c:398:43: error: ‘empty_routing’ defined but not used [-Werror=unused-const-variable=]
  398 | static const struct kvm_irq_routing_entry empty_routing[] = {};

I'll fix this up when applying, too.

  reply	other threads:[~2024-06-11  0:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-06 10:17 [v5 0/3] KVM: irqchip: synchronize srcu only if needed Yi Wang
2024-05-06 10:17 ` [v5 1/3] KVM: setup empty irq routing when create vm Yi Wang
2024-05-06 11:41   ` Christian Borntraeger
2026-04-17  8:19   ` Christian Borntraeger
2026-04-17  9:36     ` Christian Borntraeger
2026-04-17 10:19       ` Paolo Bonzini
2026-04-17 10:26         ` Christian Borntraeger
2026-05-04 12:48         ` Christian Borntraeger
2024-05-06 10:17 ` [v5 2/3] KVM: x86: don't setup empty irq routing when KVM_CAP_SPLIT_IRQCHIP Yi Wang
2024-06-11  0:25   ` Sean Christopherson [this message]
2024-06-11  1:54     ` Yi Wang
2024-05-06 10:17 ` [v5 3/3] KVM: s390: don't setup dummy routing when KVM_CREATE_IRQCHIP Yi Wang
2024-05-06 11:42   ` Christian Borntraeger
2024-06-10 16:19   ` Sean Christopherson
2024-06-11 11:53     ` Christian Borntraeger
2024-06-12  1:18 ` [v5 0/3] KVM: irqchip: synchronize srcu only if needed Sean Christopherson
2024-06-12 13:16   ` Yi Wang

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=ZmeZbjFi5FWxv-Mb@google.com \
    --to=seanjc@google.com \
    --cc=anup@brainfault.org \
    --cc=atishp@atishpatra.org \
    --cc=borntraeger@linux.ibm.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=foxywang@tencent.com \
    --cc=frankja@linux.ibm.com \
    --cc=hpa@zytor.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=mingo@redhat.com \
    --cc=oliver.upton@linux.dev \
    --cc=pbonzini@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=up2wing@gmail.com \
    --cc=wanpengli@tencent.com \
    --cc=weijiang.yang@intel.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.