From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takuya Yoshikawa Subject: Re: [PATCH 1/2] KVM: MMU: Mark sp mmio cached when creating mmio spte Date: Wed, 13 Mar 2013 22:40:56 +0900 Message-ID: <20130313224056.8c9c87f4d95b332d2273a685@gmail.com> References: <20130312174333.7f76148e.yoshikawa_takuya_b1@lab.ntt.co.jp> <20130312174440.5d5199ee.yoshikawa_takuya_b1@lab.ntt.co.jp> <5140094F.5080700@linux.vnet.ibm.com> <20130313162816.c62899dc.yoshikawa_takuya_b1@lab.ntt.co.jp> <51402DDA.607@linux.vnet.ibm.com> <20130313123358.GM11223@redhat.com> <51407441.4020200@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , Takuya Yoshikawa , mtosatti@redhat.com, kvm@vger.kernel.org To: Xiao Guangrong Return-path: Received: from mail-pb0-f47.google.com ([209.85.160.47]:48755 "EHLO mail-pb0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755585Ab3CMNlC (ORCPT ); Wed, 13 Mar 2013 09:41:02 -0400 Received: by mail-pb0-f47.google.com with SMTP id rp2so1036843pbb.20 for ; Wed, 13 Mar 2013 06:41:01 -0700 (PDT) In-Reply-To: <51407441.4020200@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, 13 Mar 2013 20:42:41 +0800 Xiao Guangrong wrote: > >>>> How about save all mmio spte into a mmio-rmap? > >>> > >>> The problem is that other mmu code would need to care about the pointers > >>> stored in the new rmap list: when mmu_shrink zaps shadow pages for example. > >> > >> It is not hard... all the codes have been wrapped by *zap_spte*. > >> > > So are you going to send a patch? What do you think about applying this > > as temporary solution? > > Hi Gleb, > > Since it only needs small change based on this patch, I think we can directly > apply the rmap-based way. > > Takuya, could you please do this? ;) Though I'm fine with my making the patch better, I'm still thinking about the bad side of it, though. In zap_spte, don't we need to search the pointer to be removed from the global mmio-rmap list? How long can that list be? Implementing it will/may not be difficult but I'm not sure if we would get pure improvement. Unless it becomes 99% sure, I think we should first take a basic approach. What do you think? Thanks, Takuya