From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Andres Lagar-Cavilla" Subject: Re: [PATCH] mem_event: use wait queue when ring is full Date: Wed, 7 Dec 2011 08:27:26 -0800 Message-ID: <7faf6e5ab8aba046eae7e0302fc5cce0.squirrel@webmail.lagarcavilla.org> References: <20111205162016.GA13352@aepfle.de> <20111207132044.GB27309@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: <20111207132044.GB27309@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: 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? Definitely. Crash that domain. Maybe the pager crashed and burned, or quit carelessly. Andres > > Olaf >