From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH 08/12] xenpaging: drop paged pages in guest_remove_page Date: Fri, 14 Jan 2011 17:53:07 +0100 Message-ID: <20110114165307.GA9060@aepfle.de> References: <20110110164345.521919826@aepfle.de> <20110110164348.394538387@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline In-Reply-To: <20110110164348.394538387@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Mon, Jan 10, Olaf Hering wrote: > Simply drop paged-pages in guest_remove_page(), and notify xenpaging to > drop its reference to the gfn. If the ring is full, the page will > remain in paged-out state in xenpaging. This is not an issue, it just > means this gfn will not be nominated again. > send one-way notification to pager to release page Here I need some help to make that a true one-way event. The currently applied version of the patch just fills up the ring, with the result that the guest can not proceed because there is no way to tell the pager about required page-in requests. How can the request which was just consumed with get_response() be freed from the ring buffer? I tried a modified version of mem_event_pause_vcpu() which does not call mem_event_pause_vcpu(), but that does not change anything. It seems the stuck guest is a result of incorrect mem_event_ring handling. Olaf > +void p2m_mem_paging_drop_page(struct p2m_domain *p2m, unsigned long gfn) > +{ > + struct vcpu *v = current; > + mem_event_request_t req; > + struct domain *d = p2m->domain; > + > + /* Check that there's space on the ring for this request */ > + if ( mem_event_check_ring(d) == 0) > + { > + /* Send release notification to pager */ > + memset(&req, 0, sizeof(req)); > + req.flags |= MEM_EVENT_FLAG_DROP_PAGE; > + req.gfn = gfn; > + req.vcpu_id = v->vcpu_id; > + > + mem_event_put_request(d, &req); > + } > +} > +