[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/3] gnttab: consolidate pin-to-status syncing


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Fri, 15 Jan 2021 13:37:02 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NfC5CRAOFmpNXXHx+BZX4ecJNu8F8/8god9Zo1up7eg=; b=TYwK2TlaPnG5CZF0JLYp1an8n0NBph+g8TBUcysuEJqH8hUWj/aiSQPRJMiCXXt/plWeoTTc2Nxr8Qqa31vELsvVQzddaTLN+GQ4WQ/Z7zttJuQFY7PxYVPpZ0yPJ8o85EKFGtOkNYAX6AjfNZKbieWsc+BU+iMitcR2vuBobLe0BqYs8DWBmm5AYhG31AFim7OwYc4FPtwCAC1Sz8HDqSW9WZpAXdgKtLSJzcnhiY60OwFjIK67E7OcV+JNeyc5jkgOiveXcaSkWfKsfKBRzb/t3GlvUrXuEvbEXEHwbnDRHz62l7F+ZxMsrvbVv8ThEl/gY8LmXpaySjMHomccEg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Sz7Fg5S9t18Qpx6//4x1Uw/UkRXTkSC1Ndb65WVVSJwIk4bQU2yTE+At4aXU7gtGtYijw8LIX+F8DLEbjJq+wBktxDGjS7Okw+GUcMkTcO0i5HovzpdmwKd+GYNxMHu6oM72gipV/nkr0C/DzRbroSlSaWPQbbY91jsj6idSM/h4CVYvJpgq6Q/eYOWBRuyEGeUCkdF9Z7JIBk8BSSODuhH85U1IMhHeIA2+2P+wIcmElTl8S/pDOnlalahSbLEKewoEIkCxS9lNELA64HQBAAObCUNOphjBDOZdtXp9ADaf3FGFn8udrenCtQauqmX0dLERQRhuv5MbtPPV2eD1iA==
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 15 Jan 2021 13:37:15 +0000
  • Ironport-sdr: KMIf+ZLUCIyeKt5lcl+CIoiqF1X1ds3FBFFox0bdSVLy+vpvcFIGJRn6EjXgTQhFCrMC0jmtSW hohBxpnFjj7ME46OiIO9ltSVPcror4foW6LEk0p4eU0Lx1CDGwfA+nnGvWI02e6V0ySQNdLnq8 rNjH76i4RL+rVSCJMlSmKOxbeBLd8EfNPd6WpoST/KSpi4ypqPg57PWjNCaG+tRUNzLbozMv42 pPbemjjlQlDoydtIg4r7ztto2hsOzz3kAhdlFYiC1FcbmQc/XS8vZsLigJwzBUqOc0/FvEN2H8 Rvk=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 15/01/2021 13:33, Jan Beulich wrote:
> On 15.01.2021 14:25, Andrew Cooper wrote:
>> On 14/01/2021 15:23, Jan Beulich wrote:
>>> --- a/xen/common/grant_table.c
>>> +++ b/xen/common/grant_table.c
>>> @@ -908,6 +908,25 @@ static int _set_status(const grant_entry
>>>          return _set_status_v2(shah, status, rd, act, readonly, mapflag, 
>>> ldomid);
>>>  }
>>>  
>>> +/*
>>> + * The status for a grant may indicate that we're taking more access than
>>> + * the pin requires.  Fix up the status to match the pin.
>> This sentence isn't correct.  It will only clear status flags to match a
>> reduction in the pinned references.  IOW it cannot be used in the case
>> that a grant goes from unpinned to pinned.
> Of course not, hence "... more access than ...". But yes, I can
> replace "Fix up" by "Reduce" if you think the wording isn't
> unambiguous enough.
>
>> How about renaming to clear_status_for_pin() to make this clearer?  I
>> don't think it is worth trying to make the operation more generic.
> Hmm, this name would suggest to me that the function clears
> whatever the present pin count requires (e.g. acting on the
> pre-update value when the post-update one is [going to be]
> zero). Maybe reduce_status_for_pin(), matching the suggested
> comment wording change?

Sounds good.  My R-by stands with this change.

~Andrew



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.