From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [PATCH 6/8] KVM: simply wakup async pf Date: Thu, 28 Oct 2010 15:59:39 +0800 Message-ID: <4CC92D6B.5090701@cn.fujitsu.com> References: <4CC7EA7D.5020901@cn.fujitsu.com> <4CC7EBD4.6070105@cn.fujitsu.com> <20101027105057.GP26191@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Marcelo Tosatti , LKML , KVM To: Gleb Natapov Return-path: Received: from cn.fujitsu.com ([222.73.24.84]:58077 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S932144Ab0J1HzV (ORCPT ); Thu, 28 Oct 2010 03:55:21 -0400 In-Reply-To: <20101027105057.GP26191@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 10/27/2010 06:50 PM, Gleb Natapov wrote: > On Wed, Oct 27, 2010 at 05:07:32PM +0800, Xiao Guangrong wrote: >> The current way is queued a complete async pf with: >> asyc_pf.page = bad_page >> async_pf.arch.gfn = 0 >> >> It has two problems while kvm_check_async_pf_completion handle this >> async_pf: >> - since !async_pf.page, it can retry a pseudo #PF > kvm_arch_async_page_ready checks for is_error_page() > >> - it can delete gfn 0 from vcpu->arch.apf.gfns[] > kvm_arch_async_page_present() checks for is_error_page() too and, > in case of PV guest, injects special token if it is true. > Ah, sorry for my stupid questions. > After your patch special token will not be injected and migration will > not work. > >> Actually, we can simply record this wakeup request and let >> kvm_check_async_pf_completion simply break the wait >> > May be wakeup_all function naming is misleading. It means wake up all PV > guest processes by sending broadcast async pf notification. It is not > about waking host vcpu thread. > I'm not good at the KVM PV way, i'll dig into it, please ignore this patch, thanks.