* Re: [Xen-devel] [PATCH v2 2/4] xen-blkback: fix memory leaks
[not found] <1391742906.53011.YahooMailNeo@web122601.mail.ne1.yahoo.com>
@ 2014-02-12 13:42 ` Egger, Christoph
0 siblings, 0 replies; only message in thread
From: Egger, Christoph @ 2014-02-12 13:42 UTC (permalink / raw)
To: Matthew Rushton, Roger Pau Monne
Cc: Ian Campbell , linux-kernel@vger.kernel.org,
mrushton@amazon.com, David Vrabel ,
msw@amazon.com, xen-devel@lists.xenproject.org,
Boris Ostrovsky , aliguori@amazon.com
On 07.02.14 04:15, Matthew Rushton wrote:
> On 04/02/14 10:26, Roger Pau Monne wrote:
>> I've at least identified two possible memory leaks in blkback, both
>> related to the shutdown path of a VBD:
>>
>> - blkback doesn't wait for any pending purge work to finish before
>> cleaning the list of free_pages. The purge work will call
>> put_free_pages and thus we might end up with pages being added to
>> the free_pages list after we have emptied it. Fix this by making
>> sure there's no pending purge work before exiting
>> xen_blkif_schedule, and moving the free_page cleanup code to
>> xen_blkif_free.
>> - blkback doesn't wait for pending requests to end before cleaning
>> persistent grants and the list of free_pages. Again this can add
>> pages to the free_pages list or persistent grants to the
>> persistent_gnts red-black tree. Fixed by moving the persistent
>> grants and free_pages cleanup code to xen_blkif_free.
>>
>> Also, add some checks in xen_blkif_free to make sure we are cleaning
>> everything.
>
> Tested-by: Matt Rushton <mrushton@amazon.com>
> Reviewed-by: Matt Rushton <mrushton@amazon.com>
Tested-by: Christoph Egger <chegger@amazon.de>
Reviewed-by: Christoph Egger <chegger@amazon.de>
Christoph
^ permalink raw reply [flat|nested] only message in thread