From: Bob Liu <bob.liu@oracle.com>
To: Julien Grall <julien.grall@citrix.com>,
Roger Pau Monne <roger.pau@citrix.com>
Cc: xen-devel@lists.xenproject.org,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
David Vrabel <david.vrabel@citrix.com>,
linux-kernel@vger.kernel.org
Subject: Re: [Xen-devel] [PATCH] xen-blkback: free requests on disconnection
Date: Mon, 07 Sep 2015 19:35:31 +0800 [thread overview]
Message-ID: <55ED7683.8010506@oracle.com> (raw)
In-Reply-To: <55ED70AC.1090505@citrix.com>
On 09/07/2015 07:10 PM, Julien Grall wrote:
> On 07/09/15 07:07, Bob Liu wrote:
>> Hi Julien,
>
> Hi Bob,
>
>> On 09/04/2015 09:51 PM, Julien Grall wrote:
>>> Hi Roger,
>>>
>>> On 04/09/15 11:08, Roger Pau Monne wrote:
>>>> Request allocation has been moved to connect_ring, which is called every
>>>> time blkback connects to the frontend (this can happen multiple times during
>>>> a blkback instance life cycle). On the other hand, request freeing has not
>>>> been moved, so it's only called when destroying the backend instance. Due to
>>>> this mismatch, blkback can allocate the request pool multiple times, without
>>>> freeing it.
>>>>
>>>> In order to fix it, move the freeing of requests to xen_blkif_disconnect to
>>>> restore the symmetry between request allocation and freeing.
>>>>
>>>> Reported-by: Julien Grall <julien.grall@citrix.com>
>>>> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>>>> Cc: Julien Grall <julien.grall@citrix.com>
>>>> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>>>> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
>>>> Cc: David Vrabel <david.vrabel@citrix.com>
>>>> Cc: xen-devel@lists.xenproject.org
>>>
>>> The patch is fixing my problem when using UEFI in the guest. Thank you!
>>>
>>
>> Could you please explain the problem you met a bit more?
>> So that I can know back port this patch if met similar issue.
>
> This is related to commit 86839c56dee28c315a4c19b7bfee450ccd84cd25
> "xen/block: add multi-page ring support" (Roger, it may be worth to
> indicate the offending commit in you commit message).
>
> When starting a guest using UEFI. After the domain is destroyed I get
> the following warning from blkback:
>
>
> ------------[ cut here ]------------
> WARNING: CPU: 2 PID: 95 at
> /home/julien/works/linux/drivers/block/xen-blkback/xenbus.c:274
> xen_blkif_deferred_free+0x1f4/0x1f8()
> Modules linked in:
> CPU: 2 PID: 95 Comm: kworker/2:1 Tainted: G W 4.2.0 #85
> Hardware name: APM X-Gene Mustang board (DT)
> Workqueue: events xen_blkif_deferred_free
> Call trace:
> [<ffff8000000890a8>] dump_backtrace+0x0/0x124
> [<ffff8000000891dc>] show_stack+0x10/0x1c
> [<ffff8000007653bc>] dump_stack+0x78/0x98
> [<ffff800000097e88>] warn_slowpath_common+0x9c/0xd4
> [<ffff800000097f80>] warn_slowpath_null+0x14/0x20
> [<ffff800000557a0c>] xen_blkif_deferred_free+0x1f0/0x1f8
> [<ffff8000000ad020>] process_one_work+0x160/0x3b4
> [<ffff8000000ad3b4>] worker_thread+0x140/0x494
> [<ffff8000000b2e34>] kthread+0xd8/0xf0
> ---[ end trace 6f859b7883c88cdd ]---
>
> This is because the allocation of the requests are done during the
> connection but the free is done when the domain is destroyed. Therefore
> if the domain is re-initializing the connection (because UEFI or PV Grub
> is used), the request won't be free and kept until the end.
>
Thank you!
Roger, I think it's better to have this information in your commit message too.
--
Regards,
-Bob
next prev parent reply other threads:[~2015-09-07 11:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-04 10:08 [PATCH] xen-blkback: free requests on disconnection Roger Pau Monne
2015-09-04 13:51 ` [Xen-devel] " Julien Grall
2015-09-04 17:21 ` Konrad Rzeszutek Wilk
2015-09-07 6:07 ` Bob Liu
2015-09-07 11:10 ` Julien Grall
2015-09-07 11:35 ` Bob Liu [this message]
2015-09-08 10:43 ` Roger Pau Monné
2015-09-09 15:02 ` Konrad Rzeszutek Wilk
2015-09-21 23:10 ` Julien Grall
2015-09-25 20:05 ` Konrad Rzeszutek Wilk
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=55ED7683.8010506@oracle.com \
--to=bob.liu@oracle.com \
--cc=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=julien.grall@citrix.com \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).