From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Andres Lagar-Cavilla" Subject: Re: [PATCH] x86/mm: Improve ring management for memory events. Do not lose guest events Date: Mon, 16 Jan 2012 07:08:16 -0800 Message-ID: <953ee1a357fc032687dc9c49f80980cc.squirrel@webmail.lagarcavilla.org> References: <20120116150444.GA30327@aepfle.de> Reply-To: andres@lagarcavilla.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120116150444.GA30327@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: Olaf Hering Cc: andres@gridcentric.ca, xen-devel@lists.xensource.com, tim@xen.org, Andres Lagar-Cavilla , adin@gridcentric.ca List-Id: xen-devel@lists.xenproject.org > On Wed, Jan 11, Andres Lagar-Cavilla wrote: > >> @@ -898,7 +902,7 @@ void p2m_mem_paging_drop_page(struct dom >> * already sent to the pager. In this case the caller has to try again >> until the >> * gfn is fully paged in again. >> */ >> -void p2m_mem_paging_populate(struct domain *d, unsigned long gfn) >> +int p2m_mem_paging_populate(struct domain *d, unsigned long gfn) >> { >> struct vcpu *v = current; >> mem_event_request_t req; > > What is the reason to return an error here? None of the callers need to > check it because they already know their condition (which is > p2m_is_paging()). And your patch doesnt seem to update them. Foreigners > try again, requests from the target domain do currently also try again > until my change to use wait queues in gfn_to_mfn* is finished. And even > then the call p2m_mem_paging_populate() will most likely remain a > one-shot/must-succeed thing if the request is from the target domain. > > The only condition to care about in p2m_mem_paging_populate() is -ENOSYS > from mem_event_claim_slot(), which your patch already handles by > crashing the guest. Since the guest is in an kind-of undefined state > anyway if the pager disappears while some gfns are still in paging state, > this is one of the possible actions. Ok, we'll make it void. Anything else pending? Thanks Andres > Olaf >