From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH] mem_event: use wait queue when ring is full Date: Wed, 7 Dec 2011 14:20:45 +0100 Message-ID: <20111207132044.GB27309@aepfle.de> References: <20111205162016.GA13352@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: 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 List-Id: xen-devel@lists.xenproject.org On Mon, Dec 05, Andres Lagar-Cavilla wrote: > > On Mon, Dec 05, Andres Lagar-Cavilla wrote: > > > >> > + med->bit = bit; > >> I think it's been asked before for this to have a more expressive name. > > > > I have to recheck, AFAIK it was the mem_bit where mem_ is redundant. > how about pause_flag? I made this change in my patch. > > Before this patch, mem_event_unpause_vcpus() was used to resume waiters > > for the ring itself and for room in the ring. > > Now there is mem_event_wake_waiters(), which indicates the ring is > > active, and there is mem_event_wake_requesters() which indicates the > > ring has room to place guest requests. > > I think that if there is no ring where one is expected, harsher actions > should happen. That is what we do in our patch. e.g. > p2m_mem_paging_populate -> no ring -> crash domain, or > p2m_mem_access_check -> access_required -> no ring -> crash domain. > > That would eliminate wake_waiters, methinks? In p2m_mem_paging_populate() a sanity check could be added. I think it would indicate bad p2mt state because nominate was called without ring. How else can a gfn enter paging state? Olaf