From: George Dunlap <george.dunlap@eu.citrix.com>
To: "Liu, Jinsong" <jinsong.liu@intel.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH 02/02] Handles broken page occurred during migration
Date: Thu, 1 Nov 2012 12:54:20 +0100 [thread overview]
Message-ID: <509262EC.90108@eu.citrix.com> (raw)
In-Reply-To: <DE8DF0795D48FD4CA783C40EC82923353766A5@SHSMSX101.ccr.corp.intel.com>
On 31/10/12 12:21, Liu, Jinsong wrote:
> Handles broken page occurred during migration
>
> This patch handles broken page which occurred during migration.
>
> It monitors the critical area of live migration (from vMCE point of view,
> the copypages stage of migration is the critical area while other areas are not).
>
> If a vMCE occur at the critical area of live migration, it marks the broken page
> to dirty map, so that at copypages stage of migration, its pfn_type
> and pfn number would transfer to target and then take appropriate action.
>
> At target, it would set p2m as p2m_ram_broken for broken page, so that if
> guest access the broken page again, it would kill itself as expected.
>
> Suggested-by: George Dunlap <george.dunlap@eu.citrix.com>
> Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
[snip]
> diff -r 3313ee9f6142 xen/arch/x86/cpu/mcheck/mce_intel.c
> --- a/xen/arch/x86/cpu/mcheck/mce_intel.c Thu Oct 25 05:49:11 2012 +0800
> +++ b/xen/arch/x86/cpu/mcheck/mce_intel.c Tue Oct 30 06:07:05 2012 +0800
> @@ -342,6 +342,22 @@
> goto vmce_failed;
> }
>
> + if ( unlikely(d->arch.vmce_monitor) )
> + {
> + /*
> + * vMCE occur during migration
> + *
> + * mark broken page to dirty bitmap, so that at copypages
> + * stage of migration, its pfn_type and pfn number would
> + * transfer to target and then take appropriate action
> + *
> + * At target, it would set p2m as p2m_ram_broken for broken
> + * page, so that if guest access the broken page again, it
> + * would kill itself as expected.
> + */
> + paging_mark_dirty(d, mfn);
> + }
> +
Given that logdirty is only enabled when we're doing some kind of
migration (Remus or otherwise), wouldn't it make sense to just
unconditionally call paging_mark_dirty(), rather than doing all this
stuff with vmce_monitor? paging_mark_dirty() is already a no-op if
live-migration is not enabled; and if it is enabled, you probably want
whoever is using logdirty to go through and deal with the broken page
anyway.
So it seems like you could just add paging_mark_dirty() to the previous
patch, and get rid of the rest of this patch entirely.
-George
next prev parent reply other threads:[~2012-11-01 11:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-31 11:21 [PATCH 02/02] Handles broken page occurred during migration Liu, Jinsong
2012-11-01 11:54 ` George Dunlap [this message]
2012-11-01 13:38 ` Liu, Jinsong
2012-11-01 19:29 ` Liu, Jinsong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=509262EC.90108@eu.citrix.com \
--to=george.dunlap@eu.citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=jinsong.liu@intel.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.