* Memory strategy in xen
@ 2013-11-17 0:26 Yunbin Wang
2013-11-18 16:39 ` George Dunlap
[not found] ` <5289F3A1.10000@citrix.com>
0 siblings, 2 replies; 3+ messages in thread
From: Yunbin Wang @ 2013-11-17 0:26 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 737 bytes --]
Hi all,
I'm a newer to xen. But now I need to do research about live migration in
xen. And now I'm confused with some questions:
1. Is shadowing page used in both paravirtualization and hvm mode? Since
from source code xc_domain_save.c, I see the following code to get dirty
memory bitmap,
frc = xc_shadow_control(
xch, dom, XEN_DOMCTL_SHADOW_OP_PEEK,
HYPERCALL_BUFFER(to_skip),
dinfo->p2m_size, NULL, 0, NULL);
2. The strategy about memory allocation in xen, I know that dom0 will get
all available memory at first, and xen will allocate memory via balloon
strategy to domU.
And now I need to know how balloon works?
Can anyone give me some ideas about questions above.
Thanks,
Yunbin Wang
[-- Attachment #1.2: Type: text/html, Size: 960 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Memory strategy in xen
2013-11-17 0:26 Memory strategy in xen Yunbin Wang
@ 2013-11-18 16:39 ` George Dunlap
[not found] ` <5289F3A1.10000@citrix.com>
1 sibling, 0 replies; 3+ messages in thread
From: George Dunlap @ 2013-11-18 16:39 UTC (permalink / raw)
To: Yunbin Wang; +Cc: xen-devel@lists.xen.org
On Sun, Nov 17, 2013 at 12:26 AM, Yunbin Wang <wangyunbin1989@gmail.com> wrote:
> Hi all,
> I'm a newer to xen. But now I need to do research about live migration in
> xen. And now I'm confused with some questions:
> 1. Is shadowing page used in both paravirtualization and hvm mode? Since
> from source code xc_domain_save.c, I see the following code to get dirty
> memory bitmap,
>
> frc = xc_shadow_control(
> xch, dom, XEN_DOMCTL_SHADOW_OP_PEEK,
> HYPERCALL_BUFFER(to_skip),
> dinfo->p2m_size, NULL, 0, NULL);
Shadow mode is enabled for PV guests only when doing migration.
-George
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Memory strategy in xen
[not found] ` <CAEPeN01y7cD9kdFzBcmb+J7FJGL124x=xKNT0HAmimDFMkatSA@mail.gmail.com>
@ 2013-12-03 14:18 ` Andrew Cooper
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Cooper @ 2013-12-03 14:18 UTC (permalink / raw)
To: Yunbin Wang; +Cc: Xen-devel List
[-- Attachment #1.1: Type: text/plain, Size: 2629 bytes --]
On 03/12/13 13:48, Yunbin Wang wrote:
> Hi Andrew,
> Thanks for your reply.
>
> How does Xen map guest virtual address to machine physical address in
> PV mode?
>
> In PV mode, guests are aware of VMM, and know the actual physical
> memory address assigned to them, so do they map guest virtual address
> to guest physical address first, and then map physical address to
> machine physical, OR they map virtual address to machine physical
> directly?
>
> Thanks,
> Yunbin Wang
Please do not drop xen-devel from CC, and please do not top-post.
Xen does not keep track of guest virtual address - that is the guests
job to do. Xen maintains the pagetables, but the PV guest has to ask
Xen to update a PTE, and what value to update it to.
PV guests are aware that their physical address space is not contiguous,
and have to take this into account for memory management purposes.
~Andrew
>
>
> 2013/11/18 Andrew Cooper <andrew.cooper3@citrix.com
> <mailto:andrew.cooper3@citrix.com>>
>
> On 17/11/13 00:26, Yunbin Wang wrote:
>> Hi all,
>> I'm a newer to xen. But now I need to do research about live
>> migration in xen. And now I'm confused with some questions:
>> 1. Is shadowing page used in both paravirtualization and hvm
>> mode? Since from source code xc_domain_save.c, I see the
>> following code to get dirty memory bitmap,
>>
>> frc = xc_shadow_control(
>> xch, dom, XEN_DOMCTL_SHADOW_OP_PEEK,
>> HYPERCALL_BUFFER(to_skip),
>> dinfo->p2m_size, NULL, 0, NULL);
>
> From domctl.h
>
> /* Log-dirty bitmap operations. */
> /* Return the bitmap and clean internal copy for next round. */
> #define XEN_DOMCTL_SHADOW_OP_CLEAN 11
> /* Return the bitmap but do not modify internal copy. */
> #define XEN_DOMCTL_SHADOW_OP_PEEK 12
>
> Shadow and logdirty are related, but not the same. Shadow is
> certainly not expected to be used with PV guests (although a PV
> guest specifying autotranslate will be run with shadowing enabled).
>
> ~Andrew
>
>>
>>
>> 2. The strategy about memory allocation in xen, I know that dom0
>> will get all available memory at first, and xen will allocate
>> memory via balloon strategy to domU.
>>
>> And now I need to know how balloon works?
>>
>> Can anyone give me some ideas about questions above.
>>
>> Thanks,
>> Yunbin Wang
>>
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xen.org <mailto:Xen-devel@lists.xen.org>
>> http://lists.xen.org/xen-devel
>
>
[-- Attachment #1.2: Type: text/html, Size: 6420 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-03 14:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-17 0:26 Memory strategy in xen Yunbin Wang
2013-11-18 16:39 ` George Dunlap
[not found] ` <5289F3A1.10000@citrix.com>
[not found] ` <CAEPeN01y7cD9kdFzBcmb+J7FJGL124x=xKNT0HAmimDFMkatSA@mail.gmail.com>
2013-12-03 14:18 ` Andrew Cooper
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).