* Re: A Problem with Page Cache in Xen
2012-01-30 8:11 A Problem with Page Cache in Xen hxkhust
@ 2012-01-30 9:47 ` Tim Deegan
2012-01-30 16:18 ` Ian Campbell
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Tim Deegan @ 2012-01-30 9:47 UTC (permalink / raw)
To: hxkhust; +Cc: xen-devel@lists.xensource.com
Hi,
At 16:11 +0800 on 30 Jan (1327939919), hxkhust wrote:
> On a physical machine with xen virtualization platform installed ,VM
> A,VM B are VM C's virtual disks are all image files,among which VM A
> and VM B's virtual disks are QCOW2 format and VM C's disk is RAW
> format. And VM A and VM B's virtual disk image files are based on VM
> C's virtual disk image file.Now these three VMs are running on the
> same physical machine with xen installed. In the process of running VM
> A get a page data from VM C's virtual disk image file. After that ,VM
> B also need to get the same page data as VM A got just now.Under this
> situation, does VMM copy the page data from VM A's memory to VM B's
> memory or get the page data from VM C's virtual disk image file in the
> physical disk again?
It reads it from the disk again, unless you're using the (prototype)
memory-sharing code that's in blktap.
> Or if I would like to figure out this problem,what shall I do?
Instrument the disk, or read the code.
Tim.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: A Problem with Page Cache in Xen
2012-01-30 8:11 A Problem with Page Cache in Xen hxkhust
2012-01-30 9:47 ` Tim Deegan
@ 2012-01-30 16:18 ` Ian Campbell
2012-01-30 19:30 ` hxkhust
2012-01-31 7:01 ` hxkhust
3 siblings, 0 replies; 6+ messages in thread
From: Ian Campbell @ 2012-01-30 16:18 UTC (permalink / raw)
To: hxkhust; +Cc: xen-devel@lists.xensource.com
On Mon, 2012-01-30 at 08:11 +0000, hxkhust wrote:
> Hi,
>
> Recently I'm dong some reserch on xen and encounter a problem that I
> cannot solve temporarily.I need your help very much and the following
> is the question I would like to ask:
> On a physical machine with xen virtualization platform installed ,VM
> A,VM B are VM C's virtual disks are all image files,among which VM A
> and VM B's virtual disks are QCOW2 format and VM C's disk is RAW
> format. And VM A and VM B's virtual disk image files are based on VM
> C's virtual disk image file.Now these three VMs are running on the
> same physical machine with xen installed.
This is an invalid/dangerous configuration. You can't really safely
write to the backing file (C's raw disk) while there are active users (A
and B's qcow2 images) of it. Imagine e.g. that all three change the same
bit of filesystem metadata in different ways...
Ian.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: A Problem with Page Cache in Xen
2012-01-30 8:11 A Problem with Page Cache in Xen hxkhust
2012-01-30 9:47 ` Tim Deegan
2012-01-30 16:18 ` Ian Campbell
@ 2012-01-30 19:30 ` hxkhust
2012-01-31 7:01 ` hxkhust
3 siblings, 0 replies; 6+ messages in thread
From: hxkhust @ 2012-01-30 19:30 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel@lists.xensource.com
[-- Attachment #1.1: Type: text/plain, Size: 1428 bytes --]
In the situation I consider here,the VM C won't be running again after it's set up.The existence of VM C is only for VM A and VM B's running.If VM A or VM B change some blocks in its file system,the change will only be stored in its own virtual disk image whose format is QCOW2.That's meaning which I would like to express.However I cannot find the solution to my problem temporarily.Your further suggest is helpful for me.
At 2012-01-31 00:18:58,"Ian Campbell" <Ian.Campbell@citrix.com> wrote:
>On Mon, 2012-01-30 at 08:11 +0000, hxkhust wrote:
>> Hi,
>>
>> Recently I'm dong some reserch on xen and encounter a problem that I
>> cannot solve temporarily.I need your help very much and the following
>> is the question I would like to ask:
>> On a physical machine with xen virtualization platform installed ,VM
>> A,VM B are VM C's virtual disks are all image files,among which VM A
>> and VM B's virtual disks are QCOW2 format and VM C's disk is RAW
>> format. And VM A and VM B's virtual disk image files are based on VM
>> C's virtual disk image file.Now these three VMs are running on the
>> same physical machine with xen installed.
>
>This is an invalid/dangerous configuration. You can't really safely
>write to the backing file (C's raw disk) while there are active users (A
>and B's qcow2 images) of it. Imagine e.g. that all three change the same
>bit of filesystem metadata in different ways...
>
>Ian.
>
>
[-- Attachment #1.2: Type: text/html, Size: 2615 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: A Problem with Page Cache in Xen
2012-01-30 8:11 A Problem with Page Cache in Xen hxkhust
` (2 preceding siblings ...)
2012-01-30 19:30 ` hxkhust
@ 2012-01-31 7:01 ` hxkhust
2012-02-02 11:01 ` Tim Deegan
3 siblings, 1 reply; 6+ messages in thread
From: hxkhust @ 2012-01-31 7:01 UTC (permalink / raw)
To: Tim Deegan; +Cc: xen-devel@lists.xensource.com
[-- Attachment #1.1: Type: text/plain, Size: 1226 bytes --]
Is the (prototype) memory-sharing code mentioned in your last email already offered in Xen resource code?
Thank you for your help.
At 2012-01-30 17:47:31,"Tim Deegan" <tim@xen.org> wrote:
>Hi,
>
>At 16:11 +0800 on 30 Jan (1327939919), hxkhust wrote:
>> On a physical machine with xen virtualization platform installed ,VM
>> A,VM B are VM C's virtual disks are all image files,among which VM A
>> and VM B's virtual disks are QCOW2 format and VM C's disk is RAW
>> format. And VM A and VM B's virtual disk image files are based on VM
>> C's virtual disk image file.Now these three VMs are running on the
>> same physical machine with xen installed. In the process of running VM
>> A get a page data from VM C's virtual disk image file. After that ,VM
>> B also need to get the same page data as VM A got just now.Under this
>> situation, does VMM copy the page data from VM A's memory to VM B's
>> memory or get the page data from VM C's virtual disk image file in the
>> physical disk again?
>
>It reads it from the disk again, unless you're using the (prototype)
>memory-sharing code that's in blktap.
>
>> Or if I would like to figure out this problem,what shall I do?
>
>Instrument the disk, or read the code.
>
>Tim.
[-- Attachment #1.2: Type: text/html, Size: 2742 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: A Problem with Page Cache in Xen
2012-01-31 7:01 ` hxkhust
@ 2012-02-02 11:01 ` Tim Deegan
0 siblings, 0 replies; 6+ messages in thread
From: Tim Deegan @ 2012-02-02 11:01 UTC (permalink / raw)
To: hxkhust; +Cc: xen-devel@lists.xensource.com
Hello,
Please don't top-post.
At 15:01 +0800 on 31 Jan (1328022097), hxkhust wrote:
> Is the (prototype) memory-sharing code mentioned in your last email
> already offered in Xen resource code?
Yes; see changeset 20693:617071a8c638 and thereabouts. But that code
went in about two years ago, and has been unmaintained since then, so I
would be very surprised if it's working now.
You should also look at the recent patches that Andres Lagar-Cavilla has
been sending, whioch update the hypervisor side of the page-sharing
code.
Cheers,
Tim.
> At 2012-01-30 17:47:31,"Tim Deegan" <tim@xen.org> wrote:
> >Hi,
> >
> >At 16:11 +0800 on 30 Jan (1327939919), hxkhust wrote:
> >> On a physical machine with xen virtualization platform installed ,VM
> >> A,VM B are VM C's virtual disks are all image files,among which VM A
> >> and VM B's virtual disks are QCOW2 format and VM C's disk is RAW
> >> format. And VM A and VM B's virtual disk image files are based on VM
> >> C's virtual disk image file.Now these three VMs are running on the
> >> same physical machine with xen installed. In the process of running VM
> >> A get a page data from VM C's virtual disk image file. After that ,VM
> >> B also need to get the same page data as VM A got just now.Under this
> >> situation, does VMM copy the page data from VM A's memory to VM B's
> >> memory or get the page data from VM C's virtual disk image file in the
> >> physical disk again?
> >
> >It reads it from the disk again, unless you're using the (prototype)
> >memory-sharing code that's in blktap.
> >
> >> Or if I would like to figure out this problem,what shall I do?
> >
> >Instrument the disk, or read the code.
^ permalink raw reply [flat|nested] 6+ messages in thread