All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen-blkback: free requests on disconnection
@ 2015-09-04 10:08 Roger Pau Monne
  2015-09-04 13:51 ` Julien Grall
  2015-09-04 13:51 ` [Xen-devel] " Julien Grall
  0 siblings, 2 replies; 19+ messages in thread
From: Roger Pau Monne @ 2015-09-04 10:08 UTC (permalink / raw)
  To: linux-kernel
  Cc: Roger Pau Monne, Julien Grall, Konrad Rzeszutek Wilk,
	Boris Ostrovsky, David Vrabel, xen-devel

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
---
This patch should be backported to 4.2.
---
 drivers/block/xen-blkback/xenbus.c | 38 ++++++++++++++++++++------------------
 1 file changed, 20 insertions(+), 18 deletions(-)

diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c
index deb3f00..7676575 100644
--- a/drivers/block/xen-blkback/xenbus.c
+++ b/drivers/block/xen-blkback/xenbus.c
@@ -212,6 +212,9 @@ static int xen_blkif_map(struct xen_blkif *blkif, grant_ref_t *gref,
 
 static int xen_blkif_disconnect(struct xen_blkif *blkif)
 {
+	struct pending_req *req, *n;
+	int i = 0, j;
+
 	if (blkif->xenblkd) {
 		kthread_stop(blkif->xenblkd);
 		wake_up(&blkif->shutdown_wq);
@@ -238,13 +241,28 @@ static int xen_blkif_disconnect(struct xen_blkif *blkif)
 	/* Remove all persistent grants and the cache of ballooned pages. */
 	xen_blkbk_free_caches(blkif);
 
+	/* Check that there is no request in use */
+	list_for_each_entry_safe(req, n, &blkif->pending_free, free_list) {
+		list_del(&req->free_list);
+
+		for (j = 0; j < MAX_INDIRECT_SEGMENTS; j++)
+			kfree(req->segments[j]);
+
+		for (j = 0; j < MAX_INDIRECT_PAGES; j++)
+			kfree(req->indirect_pages[j]);
+
+		kfree(req);
+		i++;
+	}
+
+	WARN_ON(i != (XEN_BLKIF_REQS_PER_PAGE * blkif->nr_ring_pages));
+	blkif->nr_ring_pages = 0;
+
 	return 0;
 }
 
 static void xen_blkif_free(struct xen_blkif *blkif)
 {
-	struct pending_req *req, *n;
-	int i = 0, j;
 
 	xen_blkif_disconnect(blkif);
 	xen_vbd_free(&blkif->vbd);
@@ -257,22 +275,6 @@ static void xen_blkif_free(struct xen_blkif *blkif)
 	BUG_ON(!list_empty(&blkif->free_pages));
 	BUG_ON(!RB_EMPTY_ROOT(&blkif->persistent_gnts));
 
-	/* Check that there is no request in use */
-	list_for_each_entry_safe(req, n, &blkif->pending_free, free_list) {
-		list_del(&req->free_list);
-
-		for (j = 0; j < MAX_INDIRECT_SEGMENTS; j++)
-			kfree(req->segments[j]);
-
-		for (j = 0; j < MAX_INDIRECT_PAGES; j++)
-			kfree(req->indirect_pages[j]);
-
-		kfree(req);
-		i++;
-	}
-
-	WARN_ON(i != (XEN_BLKIF_REQS_PER_PAGE * blkif->nr_ring_pages));
-
 	kmem_cache_free(xen_blkif_cachep, blkif);
 }
 
-- 
1.9.5 (Apple Git-50.3)


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [Xen-devel] [PATCH] xen-blkback: free requests on disconnection
  2015-09-04 10:08 [PATCH] xen-blkback: free requests on disconnection Roger Pau Monne
  2015-09-04 13:51 ` Julien Grall
@ 2015-09-04 13:51 ` Julien Grall
  2015-09-04 17:21   ` Konrad Rzeszutek Wilk
                     ` (3 more replies)
  1 sibling, 4 replies; 19+ messages in thread
From: Julien Grall @ 2015-09-04 13:51 UTC (permalink / raw)
  To: Roger Pau Monne, linux-kernel; +Cc: David Vrabel, xen-devel, Boris Ostrovsky

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!

Tested-by: Julien Grall <julien.grall@citrix.com>

Regards,

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] xen-blkback: free requests on disconnection
  2015-09-04 10:08 [PATCH] xen-blkback: free requests on disconnection Roger Pau Monne
@ 2015-09-04 13:51 ` Julien Grall
  2015-09-04 13:51 ` [Xen-devel] " Julien Grall
  1 sibling, 0 replies; 19+ messages in thread
From: Julien Grall @ 2015-09-04 13:51 UTC (permalink / raw)
  To: Roger Pau Monne, linux-kernel; +Cc: xen-devel, Boris Ostrovsky, David Vrabel

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!

Tested-by: Julien Grall <julien.grall@citrix.com>

Regards,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Xen-devel] [PATCH] xen-blkback: free requests on disconnection
  2015-09-04 13:51 ` [Xen-devel] " Julien Grall
@ 2015-09-04 17:21   ` Konrad Rzeszutek Wilk
  2015-09-04 17:21   ` Konrad Rzeszutek Wilk
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 19+ messages in thread
From: Konrad Rzeszutek Wilk @ 2015-09-04 17:21 UTC (permalink / raw)
  To: Julien Grall
  Cc: Roger Pau Monne, linux-kernel, xen-devel, Boris Ostrovsky, David Vrabel

On Fri, Sep 04, 2015 at 02:51:10PM +0100, 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!
> 
> Tested-by: Julien Grall <julien.grall@citrix.com>

Testing it now for regressions and should be sending an git pull next week
for it.

Thanks!
> 
> Regards,
> 
> -- 
> Julien Grall
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] xen-blkback: free requests on disconnection
  2015-09-04 13:51 ` [Xen-devel] " Julien Grall
  2015-09-04 17:21   ` Konrad Rzeszutek Wilk
@ 2015-09-04 17:21   ` Konrad Rzeszutek Wilk
  2015-09-07  6:07   ` Bob Liu
  2015-09-07  6:07   ` [Xen-devel] " Bob Liu
  3 siblings, 0 replies; 19+ messages in thread
From: Konrad Rzeszutek Wilk @ 2015-09-04 17:21 UTC (permalink / raw)
  To: Julien Grall
  Cc: xen-devel, Boris Ostrovsky, David Vrabel, linux-kernel, Roger Pau Monne

On Fri, Sep 04, 2015 at 02:51:10PM +0100, 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!
> 
> Tested-by: Julien Grall <julien.grall@citrix.com>

Testing it now for regressions and should be sending an git pull next week
for it.

Thanks!
> 
> Regards,
> 
> -- 
> Julien Grall
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Xen-devel] [PATCH] xen-blkback: free requests on disconnection
  2015-09-04 13:51 ` [Xen-devel] " Julien Grall
                     ` (2 preceding siblings ...)
  2015-09-07  6:07   ` Bob Liu
@ 2015-09-07  6:07   ` Bob Liu
  2015-09-07 11:10     ` Julien Grall
  2015-09-07 11:10     ` Julien Grall
  3 siblings, 2 replies; 19+ messages in thread
From: Bob Liu @ 2015-09-07  6:07 UTC (permalink / raw)
  To: Julien Grall
  Cc: Roger Pau Monne, linux-kernel, xen-devel, Boris Ostrovsky, David Vrabel

Hi Julien,

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.

Thanks,
-Bob

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] xen-blkback: free requests on disconnection
  2015-09-04 13:51 ` [Xen-devel] " Julien Grall
  2015-09-04 17:21   ` Konrad Rzeszutek Wilk
  2015-09-04 17:21   ` Konrad Rzeszutek Wilk
@ 2015-09-07  6:07   ` Bob Liu
  2015-09-07  6:07   ` [Xen-devel] " Bob Liu
  3 siblings, 0 replies; 19+ messages in thread
From: Bob Liu @ 2015-09-07  6:07 UTC (permalink / raw)
  To: Julien Grall
  Cc: xen-devel, Boris Ostrovsky, David Vrabel, linux-kernel, Roger Pau Monne

Hi Julien,

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.

Thanks,
-Bob

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Xen-devel] [PATCH] xen-blkback: free requests on disconnection
  2015-09-07  6:07   ` [Xen-devel] " Bob Liu
@ 2015-09-07 11:10     ` Julien Grall
  2015-09-07 11:35       ` Bob Liu
  2015-09-07 11:35       ` Bob Liu
  2015-09-07 11:10     ` Julien Grall
  1 sibling, 2 replies; 19+ messages in thread
From: Julien Grall @ 2015-09-07 11:10 UTC (permalink / raw)
  To: Bob Liu
  Cc: xen-devel, Boris Ostrovsky, David Vrabel, linux-kernel, Roger Pau Monne

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.

So I think this should be backported in Linux 4.2 where the patch has
been introduced.

Regards,

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] xen-blkback: free requests on disconnection
  2015-09-07  6:07   ` [Xen-devel] " Bob Liu
  2015-09-07 11:10     ` Julien Grall
@ 2015-09-07 11:10     ` Julien Grall
  1 sibling, 0 replies; 19+ messages in thread
From: Julien Grall @ 2015-09-07 11:10 UTC (permalink / raw)
  To: Bob Liu
  Cc: xen-devel, Boris Ostrovsky, Roger Pau Monne, David Vrabel, linux-kernel

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.

So I think this should be backported in Linux 4.2 where the patch has
been introduced.

Regards,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Xen-devel] [PATCH] xen-blkback: free requests on disconnection
  2015-09-07 11:10     ` Julien Grall
@ 2015-09-07 11:35       ` Bob Liu
  2015-09-08 10:43         ` Roger Pau Monné
  2015-09-08 10:43         ` [Xen-devel] " Roger Pau Monné
  2015-09-07 11:35       ` Bob Liu
  1 sibling, 2 replies; 19+ messages in thread
From: Bob Liu @ 2015-09-07 11:35 UTC (permalink / raw)
  To: Julien Grall, Roger Pau Monne
  Cc: xen-devel, Boris Ostrovsky, David Vrabel, linux-kernel


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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] xen-blkback: free requests on disconnection
  2015-09-07 11:10     ` Julien Grall
  2015-09-07 11:35       ` Bob Liu
@ 2015-09-07 11:35       ` Bob Liu
  1 sibling, 0 replies; 19+ messages in thread
From: Bob Liu @ 2015-09-07 11:35 UTC (permalink / raw)
  To: Julien Grall, Roger Pau Monne
  Cc: xen-devel, Boris Ostrovsky, David Vrabel, linux-kernel


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

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Xen-devel] [PATCH] xen-blkback: free requests on disconnection
  2015-09-07 11:35       ` Bob Liu
  2015-09-08 10:43         ` Roger Pau Monné
@ 2015-09-08 10:43         ` Roger Pau Monné
  2015-09-09 15:02           ` Konrad Rzeszutek Wilk
  2015-09-09 15:02           ` Konrad Rzeszutek Wilk
  1 sibling, 2 replies; 19+ messages in thread
From: Roger Pau Monné @ 2015-09-08 10:43 UTC (permalink / raw)
  To: Bob Liu, Julien Grall
  Cc: xen-devel, Boris Ostrovsky, David Vrabel, linux-kernel,
	Konrad Rzeszutek Wilk

El 07/09/15 a les 13.35, Bob Liu ha escrit:
> 
> 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.

Konrad, would you like me to resend the patch with the modified commit
message, or do you plan to amend it yourself while committing?

Roger.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] xen-blkback: free requests on disconnection
  2015-09-07 11:35       ` Bob Liu
@ 2015-09-08 10:43         ` Roger Pau Monné
  2015-09-08 10:43         ` [Xen-devel] " Roger Pau Monné
  1 sibling, 0 replies; 19+ messages in thread
From: Roger Pau Monné @ 2015-09-08 10:43 UTC (permalink / raw)
  To: Bob Liu, Julien Grall
  Cc: xen-devel, Boris Ostrovsky, David Vrabel, linux-kernel

El 07/09/15 a les 13.35, Bob Liu ha escrit:
> 
> 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.

Konrad, would you like me to resend the patch with the modified commit
message, or do you plan to amend it yourself while committing?

Roger.


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Xen-devel] [PATCH] xen-blkback: free requests on disconnection
  2015-09-08 10:43         ` [Xen-devel] " Roger Pau Monné
@ 2015-09-09 15:02           ` Konrad Rzeszutek Wilk
  2015-09-21 23:10             ` Julien Grall
  2015-09-21 23:10             ` Julien Grall
  2015-09-09 15:02           ` Konrad Rzeszutek Wilk
  1 sibling, 2 replies; 19+ messages in thread
From: Konrad Rzeszutek Wilk @ 2015-09-09 15:02 UTC (permalink / raw)
  To: Roger Pau Monné
  Cc: Bob Liu, Julien Grall, xen-devel, Boris Ostrovsky, David Vrabel,
	linux-kernel

On Tue, Sep 08, 2015 at 12:43:41PM +0200, Roger Pau Monné wrote:
> El 07/09/15 a les 13.35, Bob Liu ha escrit:
> > 
> > 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.
> 
> Konrad, would you like me to resend the patch with the modified commit
> message, or do you plan to amend it yourself while committing?

I will amend it. Thanks!
> 
> Roger.
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] xen-blkback: free requests on disconnection
  2015-09-08 10:43         ` [Xen-devel] " Roger Pau Monné
  2015-09-09 15:02           ` Konrad Rzeszutek Wilk
@ 2015-09-09 15:02           ` Konrad Rzeszutek Wilk
  1 sibling, 0 replies; 19+ messages in thread
From: Konrad Rzeszutek Wilk @ 2015-09-09 15:02 UTC (permalink / raw)
  To: Roger Pau Monné
  Cc: linux-kernel, Julien Grall, David Vrabel, xen-devel, Boris Ostrovsky

On Tue, Sep 08, 2015 at 12:43:41PM +0200, Roger Pau Monné wrote:
> El 07/09/15 a les 13.35, Bob Liu ha escrit:
> > 
> > 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.
> 
> Konrad, would you like me to resend the patch with the modified commit
> message, or do you plan to amend it yourself while committing?

I will amend it. Thanks!
> 
> Roger.
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Xen-devel] [PATCH] xen-blkback: free requests on disconnection
  2015-09-09 15:02           ` Konrad Rzeszutek Wilk
@ 2015-09-21 23:10             ` Julien Grall
  2015-09-25 20:05               ` Konrad Rzeszutek Wilk
  2015-09-25 20:05               ` [Xen-devel] " Konrad Rzeszutek Wilk
  2015-09-21 23:10             ` Julien Grall
  1 sibling, 2 replies; 19+ messages in thread
From: Julien Grall @ 2015-09-21 23:10 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, Roger Pau Monné
  Cc: linux-kernel, David Vrabel, xen-devel, Boris Ostrovsky

Hi Konrad,

On 09/09/2015 16:02, Konrad Rzeszutek Wilk wrote:
>> Konrad, would you like me to resend the patch with the modified commit
>> message, or do you plan to amend it yourself while committing?
>
> I will amend it. Thanks!

What the status for this patch?

Regards,

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] xen-blkback: free requests on disconnection
  2015-09-09 15:02           ` Konrad Rzeszutek Wilk
  2015-09-21 23:10             ` Julien Grall
@ 2015-09-21 23:10             ` Julien Grall
  1 sibling, 0 replies; 19+ messages in thread
From: Julien Grall @ 2015-09-21 23:10 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, Roger Pau Monné
  Cc: xen-devel, Boris Ostrovsky, linux-kernel, David Vrabel

Hi Konrad,

On 09/09/2015 16:02, Konrad Rzeszutek Wilk wrote:
>> Konrad, would you like me to resend the patch with the modified commit
>> message, or do you plan to amend it yourself while committing?
>
> I will amend it. Thanks!

What the status for this patch?

Regards,

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Xen-devel] [PATCH] xen-blkback: free requests on disconnection
  2015-09-21 23:10             ` Julien Grall
  2015-09-25 20:05               ` Konrad Rzeszutek Wilk
@ 2015-09-25 20:05               ` Konrad Rzeszutek Wilk
  1 sibling, 0 replies; 19+ messages in thread
From: Konrad Rzeszutek Wilk @ 2015-09-25 20:05 UTC (permalink / raw)
  To: Julien Grall
  Cc: Roger Pau Monné,
	linux-kernel, David Vrabel, xen-devel, Boris Ostrovsky

On Tue, Sep 22, 2015 at 12:10:18AM +0100, Julien Grall wrote:
> Hi Konrad,
> 
> On 09/09/2015 16:02, Konrad Rzeszutek Wilk wrote:
> >>Konrad, would you like me to resend the patch with the modified commit
> >>message, or do you plan to amend it yourself while committing?
> >
> >I will amend it. Thanks!
> 
> What the status for this patch?

Applied and sent the git pull.
> 
> Regards,
> 
> -- 
> Julien Grall

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] xen-blkback: free requests on disconnection
  2015-09-21 23:10             ` Julien Grall
@ 2015-09-25 20:05               ` Konrad Rzeszutek Wilk
  2015-09-25 20:05               ` [Xen-devel] " Konrad Rzeszutek Wilk
  1 sibling, 0 replies; 19+ messages in thread
From: Konrad Rzeszutek Wilk @ 2015-09-25 20:05 UTC (permalink / raw)
  To: Julien Grall
  Cc: xen-devel, Boris Ostrovsky, David Vrabel, linux-kernel,
	Roger Pau Monné

On Tue, Sep 22, 2015 at 12:10:18AM +0100, Julien Grall wrote:
> Hi Konrad,
> 
> On 09/09/2015 16:02, Konrad Rzeszutek Wilk wrote:
> >>Konrad, would you like me to resend the patch with the modified commit
> >>message, or do you plan to amend it yourself while committing?
> >
> >I will amend it. Thanks!
> 
> What the status for this patch?

Applied and sent the git pull.
> 
> Regards,
> 
> -- 
> Julien Grall

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2015-09-25 20:06 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-04 10:08 [PATCH] xen-blkback: free requests on disconnection Roger Pau Monne
2015-09-04 13:51 ` Julien Grall
2015-09-04 13:51 ` [Xen-devel] " Julien Grall
2015-09-04 17:21   ` Konrad Rzeszutek Wilk
2015-09-04 17:21   ` Konrad Rzeszutek Wilk
2015-09-07  6:07   ` Bob Liu
2015-09-07  6:07   ` [Xen-devel] " Bob Liu
2015-09-07 11:10     ` Julien Grall
2015-09-07 11:35       ` Bob Liu
2015-09-08 10:43         ` Roger Pau Monné
2015-09-08 10:43         ` [Xen-devel] " 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
2015-09-25 20:05               ` [Xen-devel] " Konrad Rzeszutek Wilk
2015-09-21 23:10             ` Julien Grall
2015-09-09 15:02           ` Konrad Rzeszutek Wilk
2015-09-07 11:35       ` Bob Liu
2015-09-07 11:10     ` Julien Grall

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.