From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCHv7 2/3] gnttab: refactor locking for scalability Date: Fri, 1 May 2015 19:03:02 +0100 Message-ID: <5543BFD6.4010405@citrix.com> References: <1430400525-31064-1-git-send-email-david.vrabel@citrix.com> <1430400525-31064-3-git-send-email-david.vrabel@citrix.com> <20150430143409.GF13575@deinos.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YoFHI-0000CS-9B for xen-devel@lists.xenproject.org; Fri, 01 May 2015 18:03:08 +0000 In-Reply-To: <20150430143409.GF13575@deinos.phlegethon.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tim Deegan , David Vrabel Cc: Keir Fraser , Jan Beulich , Christoph Egger , Matt Wilson , xen-devel@lists.xenproject.org, Malcolm Crossley , Ian Campbell List-Id: xen-devel@lists.xenproject.org On 30/04/15 15:34, Tim Deegan wrote: > > OK, so here we hold rd->grant_table->lock and act->lock (which is in > the rd table) and are going to acquire lgt->maptrack_lock in mapcount(). > > That means we can't ever have a path holding domA's maptrack lock that > acquires domB's gt lock or one of domB's act->locks. I think that's > OK because after this patch the only paths left that hold the maptrack > lock can't acquire anything except an act->lock of the same domain. > Do I understand that correctly? > > Also: because mapcount() itself doesn't take any act->lock, there's no > path that holds two act->locks at the same time? Um. I think it's easier if we just say you cannot take another lock while holding a maptrack_lock since that's currently the case. David