From: "Jan Beulich" Subject: Re: [PATCHv9 3/4] gnttab: make the grant table lock a read-write lock Date: Fri, 22 May 2015 07:37:46 +0100 Message-ID: <555EEADA020000780007D045@mail.emea.novell.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> <555DF6BE.20102@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 1YvgaZ-0001CW-Aj for xen-devel@lists.xenproject.org; Fri, 22 May 2015 06:37:47 +0000 In-Reply-To: <555DF6BE.20102@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, Keir Fraser , Ian Campbell , Tim Deegan List-Id: xen-devel@lists.xenproject.org >>> On 21.05.15 at 17:16, wrote: > 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? No, I'm certainly not going to be. But this series of "I don't care" worry me to a certain degree (apart from making me wonder why, as so far I thought an as secure as possible environment is key for XenServer, and "iommu=dom0-strict" is certainly helping with that, which is also why I said that this should arguably become the default). Jan