lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F0F87BE.2020202@oss.ntt.co.jp>
Date:	Fri, 13 Jan 2012 10:24:14 +0900
From:	Takuya Yoshikawa <yoshikawa.takuya@....ntt.co.jp>
To:	dave@....org
CC:	Avi Kivity <avi@...hat.com>, Marcelo Tosatti <mtosatti@...hat.com>,
	Xiao Guangrong <xiaoguangrong@...ux.vnet.ibm.com>,
	lkml <linux-kernel@...r.kernel.org>, kvm@...r.kernel.org
Subject: Re: [PATCH] KVM: MMU: increment stats after event occurrence

(2012/01/13 10:08), Davidlohr Bueso wrote:
> From: Davidlohr Bueso<dave@....org>
>
> It makes more sense to actually increment statistics for tlb flushes and page table entry updates after such _events_ occur, instead of before.

Why?

	Takuya

>
> Signed-off-by: Davidlohr Bueso<dave@....org>
> ---
>   arch/x86/kvm/mmu.c |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
> index 2a2a9b4..0b7008e 100644
> --- a/arch/x86/kvm/mmu.c
> +++ b/arch/x86/kvm/mmu.c
> @@ -3130,8 +3130,8 @@ static int nonpaging_init_context(struct kvm_vcpu *vcpu,
>
>   void kvm_mmu_flush_tlb(struct kvm_vcpu *vcpu)
>   {
> -	++vcpu->stat.tlb_flush;
>   	kvm_make_request(KVM_REQ_TLB_FLUSH, vcpu);
> +	++vcpu->stat.tlb_flush;
>   }
>
>   static void paging_new_cr3(struct kvm_vcpu *vcpu)
> @@ -3486,8 +3486,8 @@ static void mmu_pte_write_new_pte(struct kvm_vcpu *vcpu,
>   		return;
>           }
>
> -	++vcpu->kvm->stat.mmu_pte_updated;
>   	vcpu->arch.mmu.update_pte(vcpu, sp, spte, new);
> +	++vcpu->kvm->stat.mmu_pte_updated;
>   }
>
>   static bool need_remote_flush(u64 old, u64 new)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ