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

Re: [Xen-devel] [PATCH] 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:18:13 +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=uM6QHVKF3D+PBAk7fRd+umBeUtd6pMcUevl0r1WUvHw=; b=bZq79+igrX4x6tVck/KF/LxM3mRFLjVHKZ7ELjaYkU0E8/Nm2snWDRlyjg4PlPhkJ3KZ20KR6MrVjyXtEvEi/IpLD6U0ezObwCZaYjBxG2lQm+Zyci7hdvYH6nUlpBnCK+STDdQhlUBeC4VBDSa7dHpi2XzpzCfHzmxPlM1TPLqYzRYcQQ+uazM9pL/SM4Rm4kCYF+N0jdBdgIV3MHeGIeIHbnwoC9ANLvVAIJ6+UTSMxVmD3Yp4QylOG7XFsagipffzP/Q7+BXnaqdXPnqmwhsdVmxtL5YFTMa1nB0DA7RLlrbChxWkP6h6z/Zr7eykiE3KazxIK3g3xxzzvCvLKw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hv/lcWQItidS6t75VAL3ag0vuQyKF7sVCdPQfz9A7w5JSbMqKBJQSBJhdAeFGg2czkMcG1iLUwjIM7De9YwQACbPr+D9gixt4/67ytFAIXVeEb8LbOTteQr68jcN2KtE1JDvuWMYLQHHBgajps2ryzHpSTQygoWwNOIQN1yJLgEzDSuZcWJvEQ43UT5gpwjwG3UMp8y/+IajA9LVreDmkFkltq4DE/QLT8PA9xfAOzG/B2d8M1CU69UXEUmqN/wOi9AugIxrj/X0VG0EISZbKL9T7YRMwoOn4qxmSTpDehaUDtfIPL215r0DtpEXXFvxnbzMICp30krEttqDM415PA==
  • 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>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 15 Jul 2019 09:35:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVNz5AbDzZgpaVWECo7hdqnCPqGqbEVHqAgAcOBACAAAtxAA==
  • Thread-topic: [Xen-devel] [PATCH] xen/mm.h: add helper function to test-and-clear _PGC_allocated

On 15.07.2019 10:45, Paul Durrant wrote:
>> From: Jan Beulich <JBeulich@xxxxxxxx>
>> Sent: 10 July 2019 23:53
>>
>> On 10.07.2019 18:17, Paul Durrant wrote:
>>> @@ -418,13 +417,7 @@ static void hvm_free_ioreq_mfn(struct hvm_ioreq_server 
>>> *s, bool buf)
>>>        unmap_domain_page_global(iorp->va);
>>>        iorp->va = NULL;
>>>
>>> -    /*
>>> -     * Check whether we need to clear the allocation reference before
>>> -     * dropping the explicit references taken by get_page_and_type().
>>> -     */
>>> -    if ( test_and_clear_bit(_PGC_allocated, &page->count_info) )
>>> -        put_page(page);
>>> -
>>> +    clear_assignment_reference(page);
>>>        put_page_and_type(page);
>>>    }
>>
>> Is there a specific reason you drop the comment? It doesn't become
>> less relevant than when it was added, does it?
> 
> Not sure, since what's actually going on is now internal to the function.
> If I change the function name to clear_allocation_reference() then I
> think the comment probably becomes extraneous.

Well, the perspective I'm taking is that the ordering constraint
wrt put_page_and_type() doesn't go away and is a relevant part of
what the comment talks about.

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®.