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

Re: [Xen-devel] [PATCH v2] xen/mm.h: add helper function to test-and-clear _PGC_allocated


  • To: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Mon, 15 Jul 2019 10:43:56 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.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=zfWE0m5jgwjn4UMd5bLzeDQWJVHhPeTd031DiDA56eo=; b=c3oiWRKV5/ino0FRB01iaEr+c/1Rd/fXyXE7o2ygmf6kcCM6qhob0+2Au6CLfxh94rtCvNNAOHtKKpllj4/oR1Z++1TafkB7ZJCHvJWpvHYiXdNJ/Mq8a6y+YVEVmCmpYy8Atu8tKaRE3rsJRKJle9pjql7TUMvnXJzMfrif9fQOfo3F1xqxCuEDUC353YZMI1uOSxO87EjuPULw2NTrDCMoZdma6U+smJ3i+PpPzzXpTlaZwPNIH294/dEdl3V+WDtoGS/qu9S5lI5i3hkE0CeQXWNN0Qvt26zUcVIdD/iQpSBIGELkUh6OYRAygT46gLJanFtVNrcY+GbatQDcdA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dW/afKiybCCh/1IFjlo4o1gKsItaKIKvK7+oN843V1oC7P0x5+CX1Yn2rL9MFXmZtUBvy8Y2jC1P31+n/VAX74T/aWkJ7YJSiMh4ggfPLOd+EWsvqIFOXk68NRpo+FGy6aK5YX54eLNwfWAhTLxy86I8c1QB3J6XMVhpQyQQB/B5NdMXMh0PRyP/hqHozdj7TtH4kfC4H+zvC7H1mXuclwc1b85Gg0SHh2fc6kj+dV2lc0kwNbNzsRoxEamSL3HsOfMHNG8dHwyNlCiU2cn3mWZr2sk1tgnmhvu+eOqSGLGLG4RNLv6adBLaro4nMHsS5T2xANTRvFicUTL9HUAkhg==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>, "Tim \(Xen.org\)" <tim@xxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxx>, JulienGrall <julien.grall@xxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, IanJackson <Ian.Jackson@xxxxxxxxxx>, VolodymyrBabchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 15 Jul 2019 10:44:38 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVOu5JruoXiXL6K0+SvpwJHZPvbabLRrMAgAAngBCAAA/GAA==
  • Thread-topic: [PATCH v2] xen/mm.h: add helper function to test-and-clear _PGC_allocated

On 15.07.2019 11:50, Paul Durrant wrote:
>> From: Jan Beulich <JBeulich@xxxxxxxx>
>> Sent: 15 July 2019 10:24
>>
>> On 15.07.2019 11:17, Paul Durrant wrote:
>>> The _PGC_allocated flag is set on a page when it is assigned to a domain
>>> along with an initial reference count of at least 1. To clear this
>>> 'allocation' reference it is necessary to test-and-clear _PGC_allocated and
>>> then only drop the reference if the test-and-clear succeeds. This is open-
>>> coded in many places. It is also unsafe to test-and-clear _PGC_allocated
>>> unless the caller holds an additional reference.
>>>
>>> This patch adds a helper function, put_page_alloc_ref(), to replace all the
>>> open-coded test-and-clear/put_page occurrences and incorporates in that a
>>> BUG_ON() an additional page reference not being held.
>>
>> This last sentence reads somewhat strange to me - are there words
>> missing and/or mis-ordered?
> 
> Perhaps it reads better if 'BUG_ON()' is substituted with 'BUG() on'?
> I just wanted to express that there was a new check in the helper
> function that the necessary additional reference is held.

But then still more like "... incorporates in a BUG() on that an
additional ..."? At which point it imo could as well be "...
incorporates in a BUG_ON() that an additional ..." (i.e. just a
word order change from your original sentence). (There's then
perhaps also an "is" missing later in the sentence.)

>>> Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
>>
>> With the commit message aspect clarified
> 
> I am happy for you to re-word it if you feel it is not clear.

Well, the problem is that I don't feel well adjusting what a native
English speaking person has written.

Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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