From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH 2 of 5] Improve ring management for memory events. Do not lose guest events Date: Thu, 01 Dec 2011 10:19:05 +0000 Message-ID: References: <20111201181006.GP61203@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20111201181006.GP61203@ocelot.phlegethon.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Tim Deegan , Andres Lagar-Cavilla Cc: xen-devel@lists.xensource.com, ian.campbell@citrix.com, andres@gridcentric.ca, JBeulich@suse.com, ian.jackson@citrix.com, adin@gridcentric.ca List-Id: xen-devel@lists.xenproject.org On 01/12/2011 18:10, "Tim Deegan" wrote: > At 16:55 -0500 on 29 Nov (1322585711), Andres Lagar-Cavilla wrote: >> The memevent code currently has a mechanism for reserving space in the ring >> before putting an event, but each caller must individually ensure that the >> vCPUs are correctly paused if no space is available. >> >> This fixes that issue by reversing the semantics: we ensure that enough space >> is always left for one event per vCPU in the ring. If, after putting the >> current request, this constraint will be violated by the current vCPU >> when putting putting another request in the ring, we pause the vCPU. > > What about operations that touch more than one page of guest memory? > (E.g., pagetable walks, emulated faults and task switches). Can't they > still fill up the ring? > > IIRC there are still cases where we need wait-queues anyway (when we hit > a paged-out page after an non-idempotent action has already been > taken). Is the purpose of this change just to reduce the number of > wait-queue uses or do you think you can do without them entirely? It's definitely not possible to do without entirely. I'm pretty sure Andres agrees at least that far. -- Keir > Cheers, > > Tim.