From: "Jan Beulich" Subject: Re: [PATCHv11 1/4] gnttab: per-active entry locking Date: Fri, 05 Jun 2015 14:32:37 +0100 Message-ID: <5571C115020000780008167F@mail.emea.novell.com> References: <1433262381-8965-1-git-send-email-david.vrabel@citrix.com> <1433262381-8965-2-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z0rji-0001eS-Ej for xen-devel@lists.xenproject.org; Fri, 05 Jun 2015 13:32:38 +0000 In-Reply-To: <1433262381-8965-2-git-send-email-david.vrabel@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel Cc: xen-devel@lists.xenproject.org, Malcolm Crossley , Keir Fraser , Ian Campbell , Tim Deegan List-Id: xen-devel@lists.xenproject.org >>> On 02.06.15 at 18:26, wrote: > @@ -546,13 +567,19 @@ static void mapcount( > > *wrc = *rdc = 0; > > + /* > + * Must have the remote domain's grant table lock while counting > + * its active entries. > + */ > + ASSERT(spin_is_locked(&rd->grant_table->lock)); > + > for ( handle = 0; handle < lgt->maptrack_limit; handle++ ) The comment and the use of lgt->maptrack_limit contradict the documentation you add in patch 2, and it indeed is unclear why at this point the local domain's lock (its maptrack lock starting with patch 2) doesn't also need to be held. Jan