mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Cc: Li Zhong <zhong@linux.vnet.ibm.com>,
	Paul Mackerras <paulus@ozlabs.org>,
	"Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com>
Subject: [PATCH AUTOSEL for 4.4 08/25] KVM: PPC: Book 3S: XICS: correct the real mode ICP rejecting counter
Date: Wed, 25 Oct 2017 01:56:15 +0000	[thread overview]
Message-ID: <20171025015607.24625-8-alexander.levin@verizon.com> (raw)
In-Reply-To: <20171025015607.24625-1-alexander.levin@verizon.com>

From: Li Zhong <zhong@linux.vnet.ibm.com>

[ Upstream commit 37451bc95dee0e666927d6ffdda302dbbaaae6fa ]

Some counters are added in Commit 6e0365b78273 ("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 <zhong@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 arch/powerpc/kvm/book3s_hv_rm_xics.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/kvm/book3s_hv_rm_xics.c b/arch/powerpc/kvm/book3s_hv_rm_xics.c
index 24f58076d49e..1d2bc84338bf 100644
--- a/arch/powerpc/kvm/book3s_hv_rm_xics.c
+++ b/arch/powerpc/kvm/book3s_hv_rm_xics.c
@@ -280,6 +280,7 @@ static void icp_rm_deliver_irq(struct kvmppc_xics *xics, struct kvmppc_icp *icp,
 		 */
 		if (reject && reject != XICS_IPI) {
 			arch_spin_unlock(&ics->lock);
+			icp->n_reject++;
 			new_irq = reject;
 			goto again;
 		}
@@ -611,10 +612,8 @@ int kvmppc_rm_h_eoi(struct kvm_vcpu *vcpu, unsigned long xirr)
 	state = &ics->irq_state[src];
 
 	/* Still asserted, resend it */
-	if (state->asserted) {
-		icp->n_reject++;
+	if (state->asserted)
 		icp_rm_deliver_irq(xics, icp, irq);
-	}
 
 	if (!hlist_empty(&vcpu->kvm->irq_ack_notifier_list)) {
 		icp->rm_action |= XICS_RM_NOTIFY_EOI;
-- 
2.11.0

  parent reply	other threads:[~2017-10-25  2:08 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-25  1:56 [PATCH AUTOSEL for 4.4 01/25] [media] adv7604: Initialize drive strength to default when using DT Levin, Alexander (Sasha Levin)
2017-10-25  1:56 ` [PATCH AUTOSEL for 4.4 03/25] PCI: mvebu: Handle changes to the bridge windows while enabled Levin, Alexander (Sasha Levin)
2017-10-25  1:56 ` [PATCH AUTOSEL for 4.4 02/25] video: fbdev: pmag-ba-fb: Remove bad `__init' annotation Levin, Alexander (Sasha Levin)
2017-10-25  1:56 ` [PATCH AUTOSEL for 4.4 04/25] xen/netback: set default upper limit of tx/rx queues to 8 Levin, Alexander (Sasha Levin)
2017-10-25  1:56 ` [PATCH AUTOSEL for 4.4 06/25] dt-bindings: clockgen: Add compatible string for LS1012A Levin, Alexander (Sasha Levin)
2017-10-25  1:56 ` [PATCH AUTOSEL for 4.4 07/25] drm: drm_minor_register(): Clean up debugfs on failure Levin, Alexander (Sasha Levin)
2017-10-25  1:56 ` [PATCH AUTOSEL for 4.4 05/25] ARM: dts: imx53-qsb-common: fix FEC pinmux config Levin, Alexander (Sasha Levin)
2017-10-25  1:56 ` [PATCH AUTOSEL for 4.4 09/25] iommu/arm-smmu-v3: Clear prior settings when updating STEs Levin, Alexander (Sasha Levin)
2017-10-25  1:56 ` Levin, Alexander (Sasha Levin) [this message]
2017-10-25  1:56 ` [PATCH AUTOSEL for 4.4 11/25] ARM: omap2plus_defconfig: Fix probe errors on UARTs 5 and 6 Levin, Alexander (Sasha Levin)
2017-10-25  1:56 ` [PATCH AUTOSEL for 4.4 10/25] powerpc/corenet: explicitly disable the SDHC controller on kmcoge4 Levin, Alexander (Sasha Levin)
2017-10-25  1:56 ` [PATCH AUTOSEL for 4.4 16/25] phy: increase size of MII_BUS_ID_SIZE and bus_id Levin, Alexander (Sasha Levin)
2017-10-25  1:56 ` [PATCH AUTOSEL for 4.4 15/25] dt-bindings: Add vendor prefix for LEGO Levin, Alexander (Sasha Levin)
2017-10-25  1:56 ` [PATCH AUTOSEL for 4.4 14/25] dt-bindings: Add LEGO MINDSTORMS EV3 compatible specification Levin, Alexander (Sasha Levin)
2017-10-25  1:56 ` [PATCH AUTOSEL for 4.4 12/25] crypto: vmx - disable preemption to enable vsx in aes_ctr.c Levin, Alexander (Sasha Levin)
2017-10-25  1:56 ` [PATCH AUTOSEL for 4.4 13/25] iio: trigger: free trigger resource correctly Levin, Alexander (Sasha Levin)
2017-10-25  1:56 ` [PATCH AUTOSEL for 4.4 20/25] IPsec: do not ignore crypto err in ah4 input Levin, Alexander (Sasha Levin)
2017-10-25  1:56 ` [PATCH AUTOSEL for 4.4 17/25] serial: sh-sci: Fix register offsets for the IRDA serial port Levin, Alexander (Sasha Levin)
2017-10-25  1:56 ` [PATCH AUTOSEL for 4.4 19/25] netfilter: nft_meta: deal with PACKET_LOOPBACK in netdev family Levin, Alexander (Sasha Levin)
2017-10-25  1:56 ` [PATCH AUTOSEL for 4.4 18/25] usb: hcd: initialize hcd->flags to 0 when rm hcd Levin, Alexander (Sasha Levin)
2017-10-25  1:56 ` [PATCH AUTOSEL for 4.4 23/25] IB/ipoib: Change list_del to list_del_init in the tx object Levin, Alexander (Sasha Levin)
2017-10-25  1:56 ` [PATCH AUTOSEL for 4.4 24/25] s390/qeth: issue STARTLAN as first IPA command Levin, Alexander (Sasha Levin)
2017-10-25  1:56 ` [PATCH AUTOSEL for 4.4 22/25] Input: mpr121 - set missing event capability Levin, Alexander (Sasha Levin)
2017-10-25  1:56 ` [PATCH AUTOSEL for 4.4 21/25] Input: mpr121 - handle multiple bits change of status register Levin, Alexander (Sasha Levin)
2017-10-25  1:56 ` [PATCH AUTOSEL for 4.4 25/25] net: dsa: select NET_SWITCHDEV Levin, Alexander (Sasha Levin)

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=20171025015607.24625-8-alexander.levin@verizon.com \
    --to=alexander.levin@verizon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@ozlabs.org \
    --cc=stable@vger.kernel.org \
    --cc=zhong@linux.vnet.ibm.com \
    /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

all inboxes | Powered by JetHome®