WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] some questions of IO ring in xenpaging

To: olaf@xxxxxxxxx
Subject: [Xen-devel] some questions of IO ring in xenpaging
From: zhen shi <bickys1986@xxxxxxxxx>
Date: Thu, 1 Sep 2011 01:02:54 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 01 Sep 2011 03:57:19 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=ILCmf46aB+X/EuQp5meUplmdN9+kh0mBbOJbeJqI7PA=; b=Ogh3covCB9DGhWkkRQudRLVGujI1RrOkoHMzoCKqm3GklNojkL0T0nZWs5VihSyW3c uP9cGE95fpQy8s0DhtMBa9XcEE2eSfV3Gr55c8Cr4YYigK2NVXcrgap01fN9b/WqNmqG y2w+IjnvstN9bIEhNWisnDsBIbzrRsvtzJINw=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Olaf --

I have two questions to ask you about xenpaging.
1) When guest os causes page_fault for the accessed page is paging_out
or paged,it will execute p2m_mem_paging_populate() .
and in p2m_mem_paging_populate() it will first check if the ring is full.
when I ran with domU  suse11 4G memory and 8vcpus,I found there will
be a corruption in checking the ring.
For example,if 4vcpus are met with page faults when they access
different pages,and there is only four free-requests for the ring.
and then they call p2m_mem_paging_populate(),and execute
mem_event_check_ring(d) at the same time.All will find ring is not
full,and will fill the requests.It will cause the latter request to
cover the front request.
and I think there should a lock before the mem_event_check_ring(d)
,and normally it unlock after mem_event_put_request(d, &req).
You can review the attached doc of xenpaging_IO_ring.txt to see if my
opnion is right.

2)mem_sharing and xenpaging are shared with one IO ring for domU.In
the function of mem_sharing_alloc_page(),if alloc_domheap_page(d, 0)
returns NULL,then it will pause VCPU ,check if the ring is full,and
fill the request at last.
I think there is also a corruption of mem_event_check_ring(d) with it
in p2m_mem_paging_populate().We should assure
exclusively in reading the free_request and puting requests.
What's more,although it hardly fails in alloc_domheap_page(d, 0) from
mem_sharing_alloc_page() ,it will fill the requests in IO ring.
But  in xenpaging when handling the page_in requests,we have not
distinguished the requests with flag "MEM_EVENT_FLAG_VCPU_PAUSED" from
paging or sharing.It will cause if the request is from
mem_sharing_alloc_page(),it will
go to p2m_mem_paging_resume() at last,and the page's p2mt is
p2m_ram_rw.I think this is wrong.Maybe we should add the req.type when
page in .

I'm so sorry to have a poor English.But I look forward to your early reply.


                                                              Thank
you!

Attachment: xenpaging_IO_ring.txt
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>