From: Hollis Blanchard Date: Fri, 10 Oct 2008 18:12:29 +0000 Subject: Re: [PATCH 2/3] kvmppc: optimize kvm stat handling Message-Id: <1223662349.3351.19.camel@localhost.localdomain> List-Id: References: <1223636372-8946-4-git-send-email-ehrhardt@linux.vnet.ibm.com> In-Reply-To: <1223636372-8946-4-git-send-email-ehrhardt@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org On Fri, 2008-10-10 at 12:59 +0200, ehrhardt@linux.vnet.ibm.com wrote: > From: Christian Ehrhardt > > Currently we use an unneicessary if&switch to detect some cases. > To be honest we don't need the ligh_exits counter anyway, because we can > calculate it out of others. Sum_exits can also be calculated, so we can > remove that too. > MMIO, DCR and INTR can be counted on other places without these > additional control structures (The INTR case was never hit anyway). > > The handling of BOOKE_INTERRUPT_EXTERNAL/BOOKE_INTERRUPT_DECREMENTER is > similar, but we can avoid the additional if when copying 3 lines of code. > I thought about a goto there to prevent duplicate lines, but rewriting three > lines should be better style than a goto cross switch/case statements (its > also not enough code to justify a new inline function). > > Signed-off-by: Christian Ehrhardt Looks fine, but depends on your kvmppc-exit-timing.diff, which I didn't know you wanted applied already. -- Hollis Blanchard IBM Linux Technology Center