Re: [PATCH 3/6] KVM MMU: optimize/cleanup for marking parent unsync

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Xiao Guangrong
Date: Tuesday, April 13, 2010 - 8:23 pm

Marcelo Tosatti wrote:


Hi Marcelo,

I think optimizing not only means 'performance' but also means 'smaller code'(maybe 'cleanup'
is more suitable) and 'logic optimize'(do little things), i'm not sure this patch whether can
improve system performance obviously but it optimize the code logic and reduce code size, and
it not harm other code and system performance, right? :-)

Actually, the origin code has a bug, the code segment in mmu_parent_walk():

|	if (!sp->multimapped && sp->parent_pte) {
|		......
|		return;
|	}
|	hlist_for_each_entry(pte_chain, node, &sp->parent_ptes, link)
|		for (i = 0; i < NR_PTE_CHAIN_ENTRIES; ++i) {
|			......
|		}

So, if sp->parent_pte == NULL, it's unsafe...


Yeah, i also noticed these and i'm looking into these code.

Thanks,
Xiao
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/6] KVM MMU: remove unused struct, Xiao Guangrong, (Mon Apr 12, 12:59 am)
[PATCH 4/6] KVM MMU: optimize for writing cr4, Xiao Guangrong, (Mon Apr 12, 1:03 am)
[PATCH 5/6] KVM MMU: reduce kvm_mmu_page size, Xiao Guangrong, (Mon Apr 12, 1:05 am)
[PATCH 6/6] KVM MMU: optimize synchronization shadow pages, Xiao Guangrong, (Mon Apr 12, 1:06 am)
Re: [PATCH 4/6] KVM MMU: optimize for writing cr4, Avi Kivity, (Mon Apr 12, 1:34 am)
Re: [PATCH 5/6] KVM MMU: reduce kvm_mmu_page size, Avi Kivity, (Mon Apr 12, 1:36 am)
Re: [PATCH 4/6] KVM MMU: optimize for writing cr4, Xiao Guangrong, (Mon Apr 12, 3:42 am)
Re: [PATCH 5/6] KVM MMU: reduce kvm_mmu_page size, Xiao Guangrong, (Mon Apr 12, 4:11 am)
Re: [PATCH 4/6] KVM MMU: optimize for writing cr4, Avi Kivity, (Mon Apr 12, 4:22 am)
Re: [PATCH 4/6] KVM MMU: optimize for writing cr4, Xiao Guangrong, (Mon Apr 12, 8:07 pm)
Re: [PATCH 4/6] KVM MMU: optimize for writing cr4, Avi Kivity, (Mon Apr 12, 11:42 pm)
Re: [PATCH 3/6] KVM MMU: optimize/cleanup for marking pare ..., Xiao Guangrong, (Tue Apr 13, 8:23 pm)