From patchwork Wed Feb 8 22:00:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 725836 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3vJZsF5Nskz9s7H; Thu, 9 Feb 2017 09:00:49 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical-com.20150623.gappssmtp.com header.i=@canonical-com.20150623.gappssmtp.com header.b="Qc22u/ZZ"; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1cbaI9-0006jn-Us; Wed, 08 Feb 2017 22:00:45 +0000 Received: from mail-it0-f45.google.com ([209.85.214.45]) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1cbaI2-0006ir-UK for kernel-team@lists.ubuntu.com; Wed, 08 Feb 2017 22:00:39 +0000 Received: by mail-it0-f45.google.com with SMTP id 203so112111015ith.0 for ; Wed, 08 Feb 2017 14:00:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=StRgRmDggynpDrr/mpmsE7/BTWVC3Zb0yhgkuW/e9as=; b=Qc22u/ZZN+V8EXjdcObFI71ms1RyQP/t+l9oGeweRTUqo2zxK5VNKYWDX96bsMuje1 vieEsl7YAPLfhX6WzwNGiJjTIy/wp5N1dhMIwFOgDnLmnDbR89Nxi/4AINL/KVNVcLel 2arniWHvkCTJKUKm1Ls1SMtAFrjJGrlXzNUZKBaNDIDjVLaLl/NHC4AteYd0g5xShkFe xc3w3sy/FYIu6scVReiN0MbP9urdgVdkEusRaLpPT4YmCLhfUFIgYSmm5Qu73/WYuNyO j3RvtLa8RGwV6+c5KjsGU0mLWvQUAV1FYJ9gsmJoDkvuynt/vxXf/dZOXDOGfsy54foc bZIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=StRgRmDggynpDrr/mpmsE7/BTWVC3Zb0yhgkuW/e9as=; b=oe5g+2Bx/7fdbLQNfM4IzwbEz/w0AQRRfSN2sq0LpA1+MyBNElV3e7mbkwOSVtfjem isncOo25EqNTlVRZ60FNW7iiS76QHsF1PEdpt+5z5VVA0rOi5W69gNrQmIeX1LQEmMsB KDVvpC49xmf/FaVgNzPmiiI0jj7lLor8KbFFxWD/f6v/dMmeyf+T0xWlj7sIdilRh9ft Tk8ciICbjTDEtTDyADfatBBjjJpBYFzX72hGYivJz2msuct9knZ4j3zxGoDQ9sFR2EDr XibDOTjrGjtcYQRSa2pDaCmDvpBueU9WlzJZaTZ54EX8XFWkTzArL6nS8UJuKFdZtelO wBIg== X-Gm-Message-State: AIkVDXKlHtm8+68Ho8gYl9V4w1EdJnqSPj/LWHWa6nwQlxfAL5oofUU29TbbDPg83OjOxBaz X-Received: by 10.36.81.65 with SMTP id s62mr19322143ita.33.1486591237684; Wed, 08 Feb 2017 14:00:37 -0800 (PST) Received: from localhost.localdomain (host-98-127-250-84.bln-mt.client.bresnan.net. [98.127.250.84]) by smtp.gmail.com with ESMTPSA id 188sm1748025itm.12.2017.02.08.14.00.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Feb 2017 14:00:37 -0800 (PST) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/5] KVM: PPC: Book 3S: XICS: correct the real mode ICP rejecting counter Date: Wed, 8 Feb 2017 15:00:27 -0700 Message-Id: <1486591230-11006-3-git-send-email-tim.gardner@canonical.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1486591230-11006-1-git-send-email-tim.gardner@canonical.com> References: <1486591230-11006-1-git-send-email-tim.gardner@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com From: Li Zhong BugLink: http://bugs.launchpad.net/bugs/1651248 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 Signed-off-by: Paul Mackerras (cherry picked from linux-next commit 37451bc95dee0e666927d6ffdda302dbbaaae6fa) Signed-off-by: Tim Gardner --- 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 06edc43..9f6c8fe 100644 --- a/arch/powerpc/kvm/book3s_hv_rm_xics.c +++ b/arch/powerpc/kvm/book3s_hv_rm_xics.c @@ -380,6 +380,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; } @@ -711,10 +712,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;