From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH V3] X86/vMCE: handle broken page with regard to migration Date: Wed, 21 Nov 2012 11:18:44 +0000 Message-ID: <50ACB894.1070509@eu.citrix.com> References: <446f6b9bfc89137e1aa0.1353117881@ljsromley.bj.intel.com> <20646.33684.410414.579210@mariner.uk.xensource.com> <1353318919.18229.7.camel@zakaz.uk.xensource.com> <50AA5061.7040103@eu.citrix.com> <1353344256.18229.129.camel@zakaz.uk.xensource.com> <50AB9CFE.7000003@eu.citrix.com> <1353496027.13542.119.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1353496027.13542.119.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: "Liu, Jinsong" , "xen-devel@lists.xensource.com" , Ian Jackson , "JBeulich@suse.com" List-Id: xen-devel@lists.xenproject.org On 21/11/12 11:07, Ian Campbell wrote: > On Tue, 2012-11-20 at 18:54 +0000, Liu, Jinsong wrote: >> Well, let me elaborate more my thought about broken page occur at last iter: >> >> Theoretically we can separate 'broken page at last iter' into several sub-cases, and optimize case by case: >> 1. if the page (which will break at last iter) is not on dirty bitmap (of last iter) --> do nothing is OK, target will happily run w/o broken page; >> 2. if the page (which will break at last iter) is on dirty bitmap (of last iter) >> 2.1 if at last iter, vmce occur after page copy --> do nothing is OK, target happily run w/o broken page; >> 2.2 if vmce occur beofre pfn_type transfer --> do nothing is OK, V2 patch has correctly handle the case, target will set p2m broken correctly; >> 2.3 if vmce occur after pfn_type transfer and before copy page to target --> we need handle this case; >> >> Practically considering it's rare enough, and code complication, we handle it in a simple way (not so optimized but enough for real life): >> - we don't distinguish if the page is in dirty bitmap of last iter; >> - we don't prefer adding new hypercall for this corner case, instead we'd like to re-use currently existed hypercall; >> - if vmce occur at last iter, we do 1~2 more iter. > Can't a page break on each "last" iter. i.e. you might actually go > around as many times as there are pages in the last batch? I think it would be only if the pages break one by one, at just the right time -- that seems pretty unlikely. :-) -George