[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 09:24:04 +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=BXrr5nPb3dhOU6qJt1cgkNu4atgLf2h81TWJNh73a6A=; b=kYLcDuinIvjf3ZKpeagJ+YEyhp76/9qqv/kSofX2g019O9KWGiA9Gt9GBkPRgCeXxSHOl4oPqxy9f6uhjWs2Qoln3jbS8NY+POhl/8CbSiKXpMcOSWS/ZlqrNxkVa6YW4kLwMqvN8iYjt6jLjJpeMi/qMV1X3uJPGTi/qfEm7Ler9QtX8dLyovEuTj5U8ug6PX5zjT04eNAx0C/KaY1Vjl/D0IAbykdo9QOHyHx+vBjVfU4O0fHLKlggyg3itUABXqsqjCD/cogSQ1v8r1RYpMvIEeN06ICaYe/21IgzBcQXQmuiBwBADs8WWzXzTGV2TdJql3Ie14hlwQ0Mg4+Uxg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HbuWDiSeY2rlrVWBMZpGwErMWLOlzjYWcY0J13ZVC22rRn/kZ43NfD00udgPwzsBpeRa3TiAkR4b2gO7L0LP24/TqmIgd6F7u/qIWOriEbHU4PnrPlDxt9HtJuiB1ZIyMERNP90Vn8FI7D+9KnTM7B6Jci2RbiwYutSt2bfnfvPpsbw1B0D8AOc1KIuC8dM9gX9KT5tQTHoMrHlRUDBs985PjVlORCdcqpuSponkme2GnRAky4BDgASdZ0L5sjxTQf0zZek+koga2kFXCh4POFFfzEQs65kBaV54aM6elRhRfyAkH1IInwub+/qIkv2ohborOmwb85VC8prCnyH++Q==
- 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>, George Dunlap <george.dunlap@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, Julien Grall <julien.grall@xxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, VolodymyrBabchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Mon, 15 Jul 2019 09:44:45 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHVOu5JruoXiXL6K0+SvpwJHZPvbabLaDGA
- Thread-topic: [PATCH v2] xen/mm.h: add helper function to test-and-clear _PGC_allocated
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?
> Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
With the commit message aspect clarified
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|