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] Re: some questions of IO ring in xenpaging

To: zhen shi <bickys1986@xxxxxxxxx>
Subject: [Xen-devel] Re: some questions of IO ring in xenpaging
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Mon, 5 Sep 2011 13:31:55 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 05 Sep 2011 04:33:50 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1315222334; l=1453; s=domk; d=aepfle.de; h=In-Reply-To:Content-Type:MIME-Version:References:Subject:Cc:To:From: Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=82HXdVDvczLB/cEpac5rn7Vz7gc=; b=M73r3HJtm51oLeMBNxZjKAc/3xeixu6ZaHleppWzBdWUSAdbnp/zFE9sODXdxp/eipu iywDZlcA23dqSfxyEUUGVwYKnS43fd52Ed8t/3cogjG1dyGaB9lq+pn6o7ANO5fgaaLCY mSdGs/apwINjEFbvFD0Dg8Y4rYCSuXVqg/k=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110901101525.GA3258@xxxxxxxxx>
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>
References: <CACavRyA8dgzpAc3X3-2DkBTSD3FtxLnpm5O0k5NV7m=nGydFVQ@xxxxxxxxxxxxxx> <20110901101525.GA3258@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.21.rev5535 (2011-07-01)
On Thu, Sep 01, Olaf Hering wrote:

> On Thu, Sep 01, zhen shi wrote:
> 
> > 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.
> 
> Yes, you are right.
> I think mem_event_check_ring() should reserve a reference, and
> mem_event_put_request() should use that reference.
> mem_sharing_alloc_page() even has a comment that this should be done.

Try this patch. It implements some ref counting.

http://lists.xensource.com/archives/html/xen-devel/2011-09/msg00189.html

Olaf

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>