* question about xl migrate
@ 2016-05-17 9:01 Zhang, Chunyu
2016-05-17 9:36 ` Andrew Cooper
0 siblings, 1 reply; 5+ messages in thread
From: Zhang, Chunyu @ 2016-05-17 9:01 UTC (permalink / raw)
To: xen-devel
hi all
i have two question about xl migrate
write_batch
120 for ( i = 0; i < nr_pfns; ++i )
121 {
122 types[i] = mfns[i] = ctx->save.ops.pfn_to_gfn(ctx,
123 ctx->save.batch_pfns[i]);
124
125 /* Likely a ballooned page. */
126 if ( mfns[i] == INVALID_MFN )
127 {
128 set_bit(ctx->save.batch_pfns[i], ctx->save.deferred_pages);
129 ++ctx->save.nr_deferred_pages;
130 }
131 }
1. line 122
in hvm mode, is not mfns, but gfns.
right?
2. line 125
in hvm mode,would not be a balloon page.
gfn would not be INVALID_MFN.
mfn would be INVALID_MFN.
right?
if what i think is right, maybe we can change those code ?
--------------
--------------
A new email address of FJWAN is launched from Apr.1 2007.
The updated address is: zhangcy@cn.fujitsu.com
--------------------------------------------------
Zhang Chunyu
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
No. 6 Wenzhu Road, Nanjing, 210012, China
TEL:+86+25-86630566-9566
FUJITSU INTERNAL:7998-9566
FAX:+86+25-83317685
EMail:zhangcy@cn.fujitsu.com
--------------------------------------------------
This communication is for use by the intended recipient(s) only and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not an intended recipient of this communication, you are hereby notified that any dissemination, distribution or copying hereof is strictly prohibited. If you have received this communication in error, please notify me by reply e-mail, permanently delete this communication from your system, and destroy any hard copies you may have printed.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: question about xl migrate
2016-05-17 9:01 question about xl migrate Zhang, Chunyu
@ 2016-05-17 9:36 ` Andrew Cooper
2016-05-17 9:46 ` Zhang, Chunyu
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cooper @ 2016-05-17 9:36 UTC (permalink / raw)
To: Zhang, Chunyu, xen-devel
On 17/05/16 10:01, Zhang, Chunyu wrote:
> hi all
>
> i have two question about xl migrate
>
> write_batch
> 120 for ( i = 0; i < nr_pfns; ++i )
> 121 {
> 122 types[i] = mfns[i] = ctx->save.ops.pfn_to_gfn(ctx,
> 123 ctx->save.batch_pfns[i]);
> 124
> 125 /* Likely a ballooned page. */
> 126 if ( mfns[i] == INVALID_MFN )
> 127 {
> 128 set_bit(ctx->save.batch_pfns[i], ctx->save.deferred_pages);
> 129 ++ctx->save.nr_deferred_pages;
> 130 }
> 131 }
>
> 1. line 122
> in hvm mode, is not mfns, but gfns.
> right?
Correct. The array should be named "gfns" rather than "mfns", which is
the appropriate term for both PV and HVM guests.
>
> 2. line 125
> in hvm mode,would not be a balloon page.
> gfn would not be INVALID_MFN.
> mfn would be INVALID_MFN.
> right?
I don't understand what you asking here.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: question about xl migrate
2016-05-17 9:36 ` Andrew Cooper
@ 2016-05-17 9:46 ` Zhang, Chunyu
2016-05-17 9:50 ` Andrew Cooper
0 siblings, 1 reply; 5+ messages in thread
From: Zhang, Chunyu @ 2016-05-17 9:46 UTC (permalink / raw)
To: andrew.cooper3, xen-devel
hi Andrew
>On 17/05/16 10:01, Zhang, Chunyu wrote:
>> hi all
>>
>> i have two question about xl migrate
>>
>> write_batch
>> 120 for ( i = 0; i < nr_pfns; ++i )
>> 121 {
>> 122 types[i] = mfns[i] = ctx->save.ops.pfn_to_gfn(ctx,
>> 123 ctx->save.batch_pfns[i]);
>> 124
>> 125 /* Likely a ballooned page. */
>> 126 if ( mfns[i] == INVALID_MFN )
>> 127 {
>> 128 set_bit(ctx->save.batch_pfns[i], ctx->save.deferred_pages);
>> 129 ++ctx->save.nr_deferred_pages;
>> 130 }
>> 131 }
>>
>> 1. line 122
>> in hvm mode, is not mfns, but gfns.
>> right?
>
>Correct. The array should be named "gfns" rather than "mfns", which is
>the appropriate term for both PV and HVM guests.
>
>>
>> 2. line 125
>> in hvm mode,would not be a balloon page.
>> gfn would not be INVALID_MFN.
>> mfn would be INVALID_MFN.
>> right?
>
>I don't understand what you asking here.
i think those code should delete:
>> 125 /* Likely a ballooned page. */
if page is ballooed, gfns is not INVALID_MFN, but mormal.
>> 126 if ( mfns[i] == INVALID_MFN )
>> 127 {
>> 128 set_bit(ctx->save.batch_pfns[i], ctx->save.deferred_pages);
>> 129 ++ctx->save.nr_deferred_pages;
>> 130 }
those code is not for balloon.
when xc_get_pfn_type_batch is called,
ballooned page type is XEN_DOMCTL_PFINFO_XTAB
XEN_DOMCTL_PFINFO_XTAB is for ballooned pages.
>
>~Andrew
>
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: question about xl migrate
2016-05-17 9:46 ` Zhang, Chunyu
@ 2016-05-17 9:50 ` Andrew Cooper
2016-05-17 9:55 ` Zhang, Chunyu
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cooper @ 2016-05-17 9:50 UTC (permalink / raw)
To: Zhang, Chunyu, xen-devel
>>> 2. line 125
>>> in hvm mode,would not be a balloon page.
>>> gfn would not be INVALID_MFN.
>>> mfn would be INVALID_MFN.
>>> right?
>> I don't understand what you asking here.
> i think those code should delete:
>>> 125 /* Likely a ballooned page. */
> if page is ballooed, gfns is not INVALID_MFN, but mormal.
Perhaps for HVM guests. Definitely not for PV guests however.
>>> 126 if ( mfns[i] == INVALID_MFN )
>>> 127 {
>>> 128 set_bit(ctx->save.batch_pfns[i], ctx->save.deferred_pages);
>>> 129 ++ctx->save.nr_deferred_pages;
>>> 130 }
> those code is not for balloon.
>
> when xc_get_pfn_type_batch is called,
> ballooned page type is XEN_DOMCTL_PFINFO_XTAB
> XEN_DOMCTL_PFINFO_XTAB is for ballooned pages.
That is covered by the later check. This code needs to work for PV
guests as well as HVM guests. You absolutely can't go deleting this
clause, or you will break migration for PV guests.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: question about xl migrate
2016-05-17 9:50 ` Andrew Cooper
@ 2016-05-17 9:55 ` Zhang, Chunyu
0 siblings, 0 replies; 5+ messages in thread
From: Zhang, Chunyu @ 2016-05-17 9:55 UTC (permalink / raw)
To: andrew.cooper3, xen-devel
hi Andrew
>
>>>> 2. line 125
>>>> in hvm mode,would not be a balloon page.
>>>> gfn would not be INVALID_MFN.
>>>> mfn would be INVALID_MFN.
>>>> right?
>>> I don't understand what you asking here.
>> i think those code should delete:
>>>> 125 /* Likely a ballooned page. */
>> if page is ballooed, gfns is not INVALID_MFN, but mormal.
>
>Perhaps for HVM guests. Definitely not for PV guests however.
get it.
>
>>>> 126 if ( mfns[i] == INVALID_MFN )
>>>> 127 {
>>>> 128 set_bit(ctx->save.batch_pfns[i], ctx->save.deferred_pages);
>>>> 129 ++ctx->save.nr_deferred_pages;
>>>> 130 }
>> those code is not for balloon.
>>
>> when xc_get_pfn_type_batch is called,
>> ballooned page type is XEN_DOMCTL_PFINFO_XTAB
>> XEN_DOMCTL_PFINFO_XTAB is for ballooned pages.
>
>That is covered by the later check. This code needs to work for PV
>guests as well as HVM guests. You absolutely can't go deleting this
>clause, or you will break migration for PV guests.
get it.
thanks..
>
>~Andrew
>
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-05-17 9:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-17 9:01 question about xl migrate Zhang, Chunyu
2016-05-17 9:36 ` Andrew Cooper
2016-05-17 9:46 ` Zhang, Chunyu
2016-05-17 9:50 ` Andrew Cooper
2016-05-17 9:55 ` Zhang, Chunyu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).