From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754186AbbIIPDA (ORCPT ); Wed, 9 Sep 2015 11:03:00 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:16533 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753054AbbIIPCw convert rfc822-to-8bit (ORCPT ); Wed, 9 Sep 2015 11:02:52 -0400 Date: Wed, 9 Sep 2015 11:02:45 -0400 From: Konrad Rzeszutek Wilk To: Roger Pau =?iso-8859-1?Q?Monn=E9?= Cc: Bob Liu , Julien Grall , xen-devel@lists.xenproject.org, Boris Ostrovsky , David Vrabel , linux-kernel@vger.kernel.org Subject: Re: [Xen-devel] [PATCH] xen-blkback: free requests on disconnection Message-ID: <20150909150245.GA3168@l.oracle.com> References: <1441361287-41234-1-git-send-email-roger.pau@citrix.com> <55E9A1CE.9090905@citrix.com> <55ED29B3.3040805@oracle.com> <55ED70AC.1090505@citrix.com> <55ED7683.8010506@oracle.com> <55EEBBDD.5000009@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <55EEBBDD.5000009@citrix.com> User-Agent: Mutt/1.5.23 (2014-03-12) Content-Transfer-Encoding: 8BIT X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > >>>>> Signed-off-by: Roger Pau Monné > >>>>> Cc: Julien Grall > >>>>> Cc: Konrad Rzeszutek Wilk > >>>>> Cc: Boris Ostrovsky > >>>>> Cc: David Vrabel > >>>>> 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: > >> [] dump_backtrace+0x0/0x124 > >> [] show_stack+0x10/0x1c > >> [] dump_stack+0x78/0x98 > >> [] warn_slowpath_common+0x9c/0xd4 > >> [] warn_slowpath_null+0x14/0x20 > >> [] xen_blkif_deferred_free+0x1f0/0x1f8 > >> [] process_one_work+0x160/0x3b4 > >> [] worker_thread+0x140/0x494 > >> [] 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. >