Xen page sharing
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi sahil:
I think the reason why you cannot get page shared is due to the gref you got. Gref is responsible for a page allocated from domU, in my understanding it should not be 0, that is a gref 0 can not be shared, that's why I skip gref 0 to be nominated.
The gref is nominated to Xen and later used to find a corrspond MFN, so it shall not always be the same.
More, I am using 2.6.31, as far as I know, the blkback is much different from 2.6.32, But I can't tell the detail, since I know much less on the latest blkback.
thanks.
From: [email protected]
Date: Tue, 5 Apr 2011 15:16:57 -0400
Subject: Re: Xen page sharing
To: [email protected]
Hi Mao,
Thanks a lot for agreeing to help. I greatly appreciate it. Here is my current page sharing environment configuration:
1. Xen unstable version 4.1.0.rc6; mercurial repository revision #22964
2. Dom0 kernel: linux-2.6-pvops_x86_64 / 2.6.32.28
3. Relevant portions of the DomU config file (it uses the same Dom0 kernel as above)
kernel = "hvmloader"
builder='hvm'
memory = 512memory_sharing = 1
vif = [ 'type=ioemu,bridge=xenbr0,mac=00:16:3E:B1:DF:13' ]
disk = [ 'tap2:tapdisk:vhd:/home/sahil/xen-guest-hvm/xenguesthvmaiovhd,hda,w', 'phy:/dev/cdrom,hdc:cdrom,r' ] device_model = 'qemu-dm'
4. I am assuming both the DomUs need to use the same disk image for memory sharing to work; so the same config file is used for the other DomU.
5. I have tried using various combinations in the 'disk' parameter above: raw aio image, pure vhd image, aio based vhd image (using vhd-util); mode: 'w' / 'r' / 'w!'.
Quoted 1 line
From what I understand, a multi level disk image like the aio based vhd image is required as flags
TD_OPEN_RDONLYandTD_OPEN_SHAREABLEare only set on level >= 1 in 'tapdisk_vbd_open_level()' [tapdisk-vbd.c].
6. In your patch - 'tools.patch', i could not understand why you check for this condition to hold true- '((&vreq->req)->seg[treq.sidx].gref)' in functions- '__tapdisk_vbd_complete_td_request' and '__tapdisk_vbd_reissue_td_request' [tapdisk-vbd.c]. I mean, is gref=0 bad?
If I keep this condition the control is never transferred to 'memshr_vbd_issue_ro_request' or 'memshr_vbd_complete_ro_request' [interface.c] as gref is always 0 everytime I run my DomUs.
And if I remove this condition, the check '(page->count_info != (PGC_allocated | (2 + expected_refcnt)))' fails in 'page_make_sharable' [mm.c]
7. Also we had to pass domain_id to the function ''__tap_ctl_spawn()" [tap-ctl-spawn.c] that execs tapdisk, so that vbd_info.domid is set when tapdisk2 calls 'memshr_set_domid()' [interface.c].
I hope this provides sufficient information to help you in detecting the problem point. I shall wait for your reply.
Thanks again.
Regards,
Sahil
2011/4/5 tinnycloud <[email protected]>:
Quoted 28 lines
Hi Sahil:
Sure, no problem.
Did you enablememory_sharing= 1 in your HVM file? Please send me your configurations, thx.----------
发件人: [email protected] [mailto:[email protected]] 代表 Sahil Suneja
发送时间: 2011年4月5日 5:17
收件人: [email protected]
主题: Xen page sharingHi Mao Xiaoyun!
I hope you are doing good.
I am a graduate student at University of Toronto and am trying to get page sharing up and running on Xen for the past whole month now. I have been following the email communications between you, Jui-Hao Chiang and Tim Deegan on the Xen-devel mailing list. I have even tried your patch 'tools.patch' as posted in the email thread but can't seem to get any memory sharing to work. I am presently working on Xen 4.1.0 rc6.
I sincerely hope you would agree to help me set up the mem-sharing environment. Please let me know if you would be willing to do so. Thereafter, I shall provide the details on my present Xen/domO/domU configurations.
Quoted 8 lines
Waiting for your reply,
Thanks and regards,
Sahil Suneja
Systems and Networks
University of Toronto.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
HI Sahil:
Sorry for the late response.
Busy these days, since we met a serious issue on 2.6.32 kernel.
AFAIK, we don't special patch on 2.6.31. I think you could get from here
http://git.kernel.org/?p=linux/kernel/git/jeremy/xen.git;a=shortlog;h=refs/heads/xen/stable-2.6.31.x
In memory sharing, domU will first allocate a page, and grant access to dom0, and here need a gref. So that is, a gref is refer to a machine frame. During sharing, two domUs will have two gref, and Xen will use these two gref to find MFN, if the MFN is the same, then one MFN is free, that share work.
Above is my understaning, I am not sure whether gref 0 is sharable(maybe someone from devel can
detail more), but indeed, when sharing, their are gref, not 0.
Thanks.
From: [email protected]
Date: Thu, 7 Apr 2011 16:47:12 -0400
Subject: Re: Xen page sharing
To: [email protected]
Also, I do not have any particular preference for the 2.6.32 kernel, I chose it only because it was recommended on the Xen wiki. If the blkback in 2.6.31 kernel based Dom0 works for you wrt xen page sharing, I would not mind switching over to that. Can you please let me know what patches did you apply to 2.6.31?
Regards,
Sahil
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel