Re: [PATCH v3 12/15] KVM: MMU: fast invalid all shadow pages

2013-04-18 Thread Xiao Guangrong
On 04/18/2013 09:29 PM, Marcelo Tosatti wrote: > On Thu, Apr 18, 2013 at 10:03:06AM -0300, Marcelo Tosatti wrote: >> On Thu, Apr 18, 2013 at 12:00:16PM +0800, Xiao Guangrong wrote: What is the justification for this? >>> >>> We want the rmap of being deleted memslot is removed-only that

Re: [PATCH v3 12/15] KVM: MMU: fast invalid all shadow pages

2013-04-18 Thread Marcelo Tosatti
On Thu, Apr 18, 2013 at 12:00:16PM +0800, Xiao Guangrong wrote: > > > > What is the justification for this? > > We want the rmap of being deleted memslot is removed-only that is > needed for unmapping rmap out of mmu-lock. > > == > 1) do not corrupt the rmap > 2) keep pte-list-descs

Re: [PATCH v3 12/15] KVM: MMU: fast invalid all shadow pages

2013-04-18 Thread Marcelo Tosatti
On Thu, Apr 18, 2013 at 10:03:06AM -0300, Marcelo Tosatti wrote: > On Thu, Apr 18, 2013 at 12:00:16PM +0800, Xiao Guangrong wrote: > > > > > > What is the justification for this? > > > > We want the rmap of being deleted memslot is removed-only that is > > needed for unmapping rmap out of

Re: [PATCH v3 12/15] KVM: MMU: fast invalid all shadow pages

2013-04-18 Thread Marcelo Tosatti
On Thu, Apr 18, 2013 at 10:03:06AM -0300, Marcelo Tosatti wrote: On Thu, Apr 18, 2013 at 12:00:16PM +0800, Xiao Guangrong wrote: What is the justification for this? We want the rmap of being deleted memslot is removed-only that is needed for unmapping rmap out of mmu-lock.

Re: [PATCH v3 12/15] KVM: MMU: fast invalid all shadow pages

2013-04-18 Thread Marcelo Tosatti
On Thu, Apr 18, 2013 at 12:00:16PM +0800, Xiao Guangrong wrote: What is the justification for this? We want the rmap of being deleted memslot is removed-only that is needed for unmapping rmap out of mmu-lock. == 1) do not corrupt the rmap 2) keep pte-list-descs available 3)

Re: [PATCH v3 12/15] KVM: MMU: fast invalid all shadow pages

2013-04-18 Thread Xiao Guangrong
On 04/18/2013 09:29 PM, Marcelo Tosatti wrote: On Thu, Apr 18, 2013 at 10:03:06AM -0300, Marcelo Tosatti wrote: On Thu, Apr 18, 2013 at 12:00:16PM +0800, Xiao Guangrong wrote: What is the justification for this? We want the rmap of being deleted memslot is removed-only that is needed for

Re: [PATCH v3 12/15] KVM: MMU: fast invalid all shadow pages

2013-04-17 Thread Xiao Guangrong
On 04/18/2013 08:05 AM, Marcelo Tosatti wrote: > On Tue, Apr 16, 2013 at 02:32:50PM +0800, Xiao Guangrong wrote: >> The current kvm_mmu_zap_all is really slow - it is holding mmu-lock to >> walk and zap all shadow pages one by one, also it need to zap all guest >> page's rmap and all shadow page's

Re: [PATCH v3 12/15] KVM: MMU: fast invalid all shadow pages

2013-04-17 Thread Marcelo Tosatti
On Tue, Apr 16, 2013 at 02:32:50PM +0800, Xiao Guangrong wrote: > The current kvm_mmu_zap_all is really slow - it is holding mmu-lock to > walk and zap all shadow pages one by one, also it need to zap all guest > page's rmap and all shadow page's parent spte list. Particularly, things > become

Re: [PATCH v3 12/15] KVM: MMU: fast invalid all shadow pages

2013-04-17 Thread Marcelo Tosatti
On Tue, Apr 16, 2013 at 02:32:50PM +0800, Xiao Guangrong wrote: The current kvm_mmu_zap_all is really slow - it is holding mmu-lock to walk and zap all shadow pages one by one, also it need to zap all guest page's rmap and all shadow page's parent spte list. Particularly, things become worse

Re: [PATCH v3 12/15] KVM: MMU: fast invalid all shadow pages

2013-04-17 Thread Xiao Guangrong
On 04/18/2013 08:05 AM, Marcelo Tosatti wrote: On Tue, Apr 16, 2013 at 02:32:50PM +0800, Xiao Guangrong wrote: The current kvm_mmu_zap_all is really slow - it is holding mmu-lock to walk and zap all shadow pages one by one, also it need to zap all guest page's rmap and all shadow page's parent

[PATCH v3 12/15] KVM: MMU: fast invalid all shadow pages

2013-04-16 Thread Xiao Guangrong
The current kvm_mmu_zap_all is really slow - it is holding mmu-lock to walk and zap all shadow pages one by one, also it need to zap all guest page's rmap and all shadow page's parent spte list. Particularly, things become worse if guest uses more memory or vcpus. It is not good for scalability.

[PATCH v3 12/15] KVM: MMU: fast invalid all shadow pages

2013-04-16 Thread Xiao Guangrong
The current kvm_mmu_zap_all is really slow - it is holding mmu-lock to walk and zap all shadow pages one by one, also it need to zap all guest page's rmap and all shadow page's parent spte list. Particularly, things become worse if guest uses more memory or vcpus. It is not good for scalability.