From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Andres Lagar-Cavilla" Subject: Re: [PATCH 3 of 7] Rework locking in the PoD layer Date: Thu, 9 Feb 2012 06:45:48 -0800 Message-ID: References: <5416a3b371f2387dfcf2.1328766348@xdev.gridcentric.ca> Reply-To: andres@lagarcavilla.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: 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: George Dunlap Cc: andres@gridcentric.ca, xen-devel@lists.xensource.com, tim@xen.org, keir.xen@gmail.com, adin@gridcentric.ca List-Id: xen-devel@lists.xenproject.org > On Thu, Feb 9, 2012 at 5:45 AM, Andres Lagar-Cavilla > wrote: >> @@ -114,15 +114,20 @@ p2m_pod_cache_add(struct p2m_domain *p2m >> =A0 =A0 =A0 =A0 unmap_domain_page(b); >> =A0 =A0 } >> >> + =A0 =A0/* First, take all pages off the domain list */ >> =A0 =A0 lock_page_alloc(p2m); >> - >> - =A0 =A0/* First, take all pages off the domain list */ >> =A0 =A0 for(i=3D0; i < 1 << order ; i++) >> =A0 =A0 { >> =A0 =A0 =A0 =A0 p =3D page + i; >> =A0 =A0 =A0 =A0 page_list_del(p, &d->page_list); >> =A0 =A0 } >> >> + =A0 =A0/* Ensure that the PoD cache has never been emptied. >> + =A0 =A0 * This may cause "zombie domains" since the page will never be >> freed. */ >> + =A0 =A0BUG_ON( d->arch.relmem !=3D RELMEM_not_started ); >> + >> + =A0 =A0unlock_page_alloc(p2m); >> + > > I thought we were going to get rid of this BUG_ON? :-) > > Other than that, assuming that you've tested it and it works: Well, I've tested it for months. Does it work? Can that ever be fully answered? ;) > > Acked-by: George Dunlap Great, thanks George! Tim, I can resend with BUG_ON eliminated and George's Acked-by. Or, wait for more comments. Or, send a micro-patch later removing the BUG_ON. Andres >