From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH v2 01/15] KVM: MMU: fix the count of spte number Date: Sun, 8 Sep 2013 17:26:02 +0300 Message-ID: <20130908142602.GL17294@redhat.com> References: <1378376958-27252-1-git-send-email-xiaoguangrong@linux.vnet.ibm.com> <1378376958-27252-2-git-send-email-xiaoguangrong@linux.vnet.ibm.com> <20130908121917.GH17294@redhat.com> <20130908140149.GA6468@redhat.com> <6A5E49EE-3729-4825-AF31-CF03DDD92E64@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=cp1255 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Xiao Guangrong , avi.kivity@gmail.com, mtosatti@redhat.com, pbonzini@redhat.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org To: Xiao Guangrong Return-path: Content-Disposition: inline In-Reply-To: <6A5E49EE-3729-4825-AF31-CF03DDD92E64@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Sun, Sep 08, 2013 at 10:24:05PM +0800, Xiao Guangrong wrote: >=20 > On Sep 8, 2013, at 10:01 PM, Gleb Natapov wrote: >=20 > > On Sun, Sep 08, 2013 at 09:55:04PM +0800, Xiao Guangrong wrote: > >>=20 > >> On Sep 8, 2013, at 8:19 PM, Gleb Natapov wrote: > >>=20 > >>> On Thu, Sep 05, 2013 at 06:29:04PM +0800, Xiao Guangrong wrote: > >>>> If the desc is the last one and it is full, its sptes is not cou= nted > >>>>=20 > >>> Hmm, if desc is not full but it is not the last one all sptes aft= er the > >>> desc are not counted too. > >>=20 > >> But the desc must be the last one if it's not full since we always= add > >> new entry or delete entry from the last desc. > >>=20 > > Why do we alway delete entries from last desc? We delete them from = the > > desc we found them in. Current code does not try to move entries be= tween > > descs, only inside a desc. >=20 > Oh, yes. Sorry, my memory is wrong=85 :( >=20 > So, currently there has some gaps in desc and it wastes memory. Can = not fix > them with simple change and i think it is not worthy to fix them sep= arately since > after my new algorithm, these should all be fixed=85 so how about jus= t drop this > fix? >=20 Yes, if we are going to change algorithm anyway no need to spend time fixing what we have now. -- Gleb.