From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCHv9 3/4] gnttab: make the grant table lock a read-write lock Date: Thu, 21 May 2015 16:16:14 +0100 Message-ID: <555DF6BE.20102@citrix.com> References: <1432137250-3700-1-git-send-email-david.vrabel@citrix.com> <1432137250-3700-4-git-send-email-david.vrabel@citrix.com> <555DD049020000780007CAD2@mail.emea.novell.com> <555DDF4E.7030508@citrix.com> <555E0D7A020000780007CCBF@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YvTAC-0006oB-AW for xen-devel@lists.xenproject.org; Thu, 21 May 2015 16:17:40 +0000 In-Reply-To: <555E0D7A020000780007CCBF@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , David Vrabel Cc: xen-devel@lists.xenproject.org, Keir Fraser , Ian Campbell , Tim Deegan List-Id: xen-devel@lists.xenproject.org On 21/05/15 15:53, Jan Beulich wrote: >>>> On 21.05.15 at 15:36, wrote: >> On 21/05/15 11:32, Jan Beulich wrote: >>>>>> On 20.05.15 at 17:54, wrote: >>>> @@ -827,9 +828,11 @@ __gnttab_map_grant_ref( >>>> if ( (wrc + rdc) == 0 ) >>>> err = iommu_map_page(ld, frame, frame, IOMMUF_readable); >>>> } >>>> + >>>> + double_gt_lock(lgt, rgt); >>> >>> unlock. And with this code path actually used (due to the bug it's >>> pretty clear it didn't get exercised in your testing), how does >>> performance look like? >> >> I think it will be no worse than what it was before -- this path already >> really sucks (mapcount() loops over 1000s of entries). I don't care >> about this path at all. > > It's kind of strange that you don't care about this case - afaict we're > not getting there by default solely because dom0-strict mode is not > currently the default (albeit arguably it should be). What's your point? Are you going to refuse this series unless it also optimizes dom0-strict mode? David