From: David Vrabel <david.vrabel@citrix.com>
To: Roger Pau Monne <roger.pau@citrix.com>
Cc: <xen-devel@lists.xenproject.org>, <linux-kernel@vger.kernel.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Matt Rushton <mrushton@amazon.com>, Matt Wilson <msw@amazon.com>,
Ian Campbell <Ian.Campbell@citrix.com>
Subject: Re: [PATCH v2 2/4] xen-blkback: fix memory leaks
Date: Tue, 4 Feb 2014 10:32:44 +0000 [thread overview]
Message-ID: <52F0C1CC.6040706@citrix.com> (raw)
In-Reply-To: <1391509575-3949-3-git-send-email-roger.pau@citrix.com>
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.
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
> + if (log_stats)
> + print_stats(blkif);
Unrelated to this series, but this log_stats stuff can be removed.
David
next prev parent reply other threads:[~2014-02-04 10:32 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-04 10:26 [PATCH v2 0/4] xen-blk: bug fixes Roger Pau Monne
2014-02-04 10:26 ` [PATCH v2 1/4] xen-blkback: fix memory leak when persistent grants are used Roger Pau Monne
2014-02-04 10:26 ` Roger Pau Monne
2014-02-04 10:30 ` David Vrabel
2014-02-04 10:30 ` David Vrabel
2014-02-04 10:30 ` David Vrabel
2014-02-04 10:26 ` Roger Pau Monne
2014-02-04 10:26 ` [PATCH v2 2/4] xen-blkback: fix memory leaks Roger Pau Monne
2014-02-04 10:26 ` Roger Pau Monne
2014-02-04 10:32 ` David Vrabel
2014-02-04 10:32 ` David Vrabel [this message]
2014-02-04 10:26 ` [PATCH v2 3/4] xen-blkback: fix shutdown race Roger Pau Monne
2014-02-04 10:26 ` Roger Pau Monne
2014-02-04 10:34 ` David Vrabel
2014-02-04 10:34 ` David Vrabel
2014-02-04 10:26 ` [PATCH v2 4/4] xen-blkif: drop struct blkif_request_segment_aligned Roger Pau Monne
2014-02-04 10:26 ` Roger Pau Monne
2014-02-04 10:35 ` David Vrabel
2014-02-04 10:35 ` David Vrabel
2014-02-04 15:15 ` [Xen-devel] [PATCH v2 0/4] xen-blk: bug fixes Konrad Rzeszutek Wilk
2014-02-06 4:57 ` Matt Wilson
2014-02-06 16:20 ` Konrad Rzeszutek Wilk
2014-02-07 4:24 ` Matt Wilson
2014-02-07 8:08 ` Roger Pau Monné
2014-02-07 8:08 ` [Xen-devel] " Roger Pau Monné
2014-02-07 4:24 ` Matt Wilson
2014-02-06 16:20 ` Konrad Rzeszutek Wilk
2014-02-06 4:57 ` Matt Wilson
2014-02-04 15:15 ` Konrad Rzeszutek Wilk
-- strict thread matches above, loose matches on Subject: below --
2014-02-07 3:15 [PATCH v2 2/4] xen-blkback: fix memory leaks Matthew Rushton
2014-02-12 13:42 ` Egger, Christoph
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52F0C1CC.6040706@citrix.com \
--to=david.vrabel@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mrushton@amazon.com \
--cc=msw@amazon.com \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.