From: Tim Deegan Subject: Re: [PATCH 2 of 5] Improve ring management for memory events. Do not lose guest events Date: Thu, 1 Dec 2011 18:10:06 +0000 Message-ID: <20111201181006.GP61203@ocelot.phlegethon.org> References: <43dc614d543cdf84189d.1322603711@xdev.gridcentric.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <43dc614d543cdf84189d.1322603711@xdev.gridcentric.ca> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Andres Lagar-Cavilla Cc: xen-devel@lists.xensource.com, ian.campbell@citrix.com, andres@gridcentric.ca, keir.xen@gmail.com, JBeulich@suse.com, ian.jackson@citrix.com, adin@gridcentric.ca List-Id: xen-devel@lists.xenproject.org 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? Cheers, Tim.