Re: [PATCH 2/3] kvmppc: optimize kvm stat handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2008-10-10 at 12:59 +0200, ehrhardt@xxxxxxxxxxxxxxxxxx wrote:
> From: Christian Ehrhardt <ehrhardt@xxxxxxxxxxxxxxxxxx>
> 
> 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 <ehrhardt@xxxxxxxxxxxxxxxxxx>

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

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux