From: Michael Mueller <mimu@linux.ibm.com>
To: linux-s390@vger.kernel.org, kvm@vger.kernel.org
Cc: borntraeger@de.ibm.com, frankja@linux.ibm.com, david@redhat.com,
cohuck@redhat.com, heiko.carstens@de.ibm.com, gor@linux.ibm.com,
Michael Mueller <mimu@linux.ibm.com>
Subject: [PATCH] KVM: s390: pending interrupts are unlikely
Date: Fri, 13 Mar 2020 13:40:30 +0100 [thread overview]
Message-ID: <20200313124030.99834-1-mimu@linux.ibm.com> (raw)
A statistical analysis shows that in most cases when deliverable_irqs()
is called, no interrupts are pending. (see: early exit ratio)
The data was sampled during an iperf3 run over virtio_net
between one guest and the host.
deliverable_irqs()
called = 3145123
by kvm_s390_vcpu_has_irq() = 3005581 (95.56%)
by kvm_arch_vcpu_runnable() = 3005578 (95.56%)
by kvm_s390_handle_wait() = 1219331 (38.76%)
by kvm_vcpu_check_block() = 2943565 (93.59%)
by kvm_cpu_block(1) = 2826431 (89.86%)
by kvm_cpu_block(2) = 117136 (3.72%)
by kvm_arch_dy_runnable() = 0 (0%)
by kvm_arch_setup_async_pf() = 0 (0%)
by handle_stop() = 0 (0%)
by kvm_s390_deliver_pending_interrupt() = 139542 (4.43%)
irqs_delivered = (0:15917 1:61810 2:1 3:0 4:0 x:0)
irqs_pending = (0:15917 1:61722 2:86 3:1 4:0 x:0)
early exit = 3021787 (96.07%)
pending irqs = 123237 (3.91%)
Signed-off-by: Michael Mueller <mimu@linux.ibm.com>
---
arch/s390/kvm/interrupt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
index 028167d6eacd..c34d62b4209e 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -369,7 +369,7 @@ static unsigned long deliverable_irqs(struct kvm_vcpu *vcpu)
unsigned long active_mask;
active_mask = pending_irqs(vcpu);
- if (!active_mask)
+ if (likely(!active_mask))
return 0;
if (psw_extint_disabled(vcpu))
--
2.17.0
next reply other threads:[~2020-03-13 12:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-13 12:40 Michael Mueller [this message]
2020-03-13 12:48 ` [PATCH] KVM: s390: pending interrupts are unlikely David Hildenbrand
2020-03-13 12:52 ` Christian Borntraeger
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=20200313124030.99834-1-mimu@linux.ibm.com \
--to=mimu@linux.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox