Received: by 10.223.164.202 with SMTP id h10csp216374wrb; Mon, 13 Nov 2017 05:25:43 -0800 (PST) X-Google-Smtp-Source: AGs4zMbEWNT+9QsZVGoTisx1IO85n77XKtXRdZHTCv0blraVMNSo3pHvckXWGt1/h4L9fHptJ9BV X-Received: by 10.98.212.12 with SMTP id a12mr4824207pfh.164.1510579542874; Mon, 13 Nov 2017 05:25:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510579542; cv=none; d=google.com; s=arc-20160816; b=0VTlI7owoUNFWQc+dJGyUwKw7HwElcDUAZiFdxHZnYjiA9wd00rY6uZ0/5TpCDz8Ot e+EKLqdL5gGfWk/CAEI8SHrcyWPUbXAuEWUF/PqNqTzM6jTGnN6sPfWwx+NnO0pbtKfk Z4xS6Vz9UpCWDKdSdgNtenTKZu2Ksm8jH+C8TIh2/TaYjKJnM/8uIPK5b4nDGY0QsJnQ a++c13o2Cry4sC1joUJSnAKB7JH8m7tYiamOE/zNYdQ5K+ErHG2Wc2KN8V5NPUNBMdDk xd4AjGgIpcvAOvq/A1wm+4uvpM+qso0X5tYHzF5sfT2fWYBeN8+GJRDPn3lJ1wrwdJI3 CbMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=AK2HuPNHvtmZyde8tk7TSV4M9v1VKdMy8ucf4hjG/kg=; b=cbhc6eKMcwkm3yDYPMiMgJK8FgDyfuMC//D9pb2rgRVfGvsWMVZoGMX9qVOF3ArHel oI2tQDY3+CT/rESDXjOUIxHk/TNrSoQpgVTMpmYQeDtEznbv3ngwIaEs4TBB0n6H0C9/ BKZ8NH7vcNjAgPsUIP5XaeMBV14fXpIgagacfyBvAeIn5DD3Byj81oU9n+OeCa7NfYiv jwDShkue69MC1s1CCwXiKBUQmXtgr4Xpunq+HUxZCfIT7fgHLx6UmxhLuKaC9vYOJUvr FR59foYx7i6mjCJe4DGBtVrpEAxPeA8/OLazewtOLTSazr0CqTl/5cpnqhlhyS2XJwPr +izg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w18si13737834pgq.366.2017.11.13.05.25.29; Mon, 13 Nov 2017 05:25:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754453AbdKMNAm (ORCPT + 95 others); Mon, 13 Nov 2017 08:00:42 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:50024 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753492AbdKMNAj (ORCPT ); Mon, 13 Nov 2017 08:00:39 -0500 Received: from localhost (LFbn-1-12253-150.w90-92.abo.wanadoo.fr [90.92.67.150]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 352F0AB5; Mon, 13 Nov 2017 13:00:39 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Li Zhong , Paul Mackerras , Sasha Levin Subject: [PATCH 4.9 12/87] KVM: PPC: Book 3S: XICS: correct the real mode ICP rejecting counter Date: Mon, 13 Nov 2017 13:55:29 +0100 Message-Id: <20171113125616.366971096@linuxfoundation.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171113125615.304035578@linuxfoundation.org> References: <20171113125615.304035578@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Li Zhong [ 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 Signed-off-by: Paul Mackerras Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/kvm/book3s_hv_rm_xics.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/arch/powerpc/kvm/book3s_hv_rm_xics.c +++ b/arch/powerpc/kvm/book3s_hv_rm_xics.c @@ -376,6 +376,7 @@ static void icp_rm_deliver_irq(struct kv */ if (reject && reject != XICS_IPI) { arch_spin_unlock(&ics->lock); + icp->n_reject++; new_irq = reject; goto again; } @@ -707,10 +708,8 @@ int kvmppc_rm_h_eoi(struct kvm_vcpu *vcp 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; From 1583955814750199119@xxx Mon Nov 13 12:59:38 +0000 2017 X-GM-THRID: 1583955814750199119 X-Gmail-Labels: Inbox,Category Promotions,HistoricalUnread