Skip to content

Commit 37451bc

Browse files
Li Zhongpaulusmack
authored andcommitted
KVM: PPC: Book 3S: XICS: correct the real mode ICP rejecting counter
Some counters are added in Commit 6e0365b ("KVM: PPC: Book3S HV: Add ICP real mode counters"), to provide some performance statistics to determine whether further optimizing is needed for real mode functions. The n_reject counter counts how many times ICP rejects an irq because of priority in real mode. The redelivery of an lsi that is still asserted after eoi doesn't fall into this category, so the increasement there is removed. Also, it needs to be increased in icp_rm_deliver_irq() if it rejects another one. Signed-off-by: Li Zhong <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
1 parent 5efa660 commit 37451bc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

arch/powerpc/kvm/book3s_hv_rm_xics.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ static void icp_rm_deliver_irq(struct kvmppc_xics *xics, struct kvmppc_icp *icp,
380380
*/
381381
if (reject && reject != XICS_IPI) {
382382
arch_spin_unlock(&ics->lock);
383+
icp->n_reject++;
383384
new_irq = reject;
384385
goto again;
385386
}
@@ -711,10 +712,8 @@ int kvmppc_rm_h_eoi(struct kvm_vcpu *vcpu, unsigned long xirr)
711712
state = &ics->irq_state[src];
712713

713714
/* Still asserted, resend it */
714-
if (state->asserted) {
715-
icp->n_reject++;
715+
if (state->asserted)
716716
icp_rm_deliver_irq(xics, icp, irq);
717-
}
718717

719718
if (!hlist_empty(&vcpu->kvm->irq_ack_notifier_list)) {
720719
icp->rm_action |= XICS_RM_NOTIFY_EOI;

0 commit comments

Comments
 (0)