Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2476042imm; Thu, 27 Sep 2018 13:34:13 -0700 (PDT) X-Google-Smtp-Source: ACcGV63X1DFQWqd36nSGbww9Rmss3hVMbe/dScbe9A0T4XqcPDkmFnTFVPGn7RcjQ/AYMEGmEGfa X-Received: by 2002:a17:902:f01:: with SMTP id 1-v6mr12888982ply.8.1538080453823; Thu, 27 Sep 2018 13:34:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538080453; cv=none; d=google.com; s=arc-20160816; b=p/mjzeSy0qrw3kqwbzz6ga6AJ1LT8yaEuX4jDXL0FJJxK2dE2hCp11DSLu7YbO1PN9 OmT95a49YJqTaXcqOEjgkfPqJtW+vv22GadJH2DaqZ3nGJOUER2XjUzWlNl9FO8OA3wt +ZalQeLn7WUXB7h19SCgrLiLnWQPZhp22Q7L+GHGJv2k/9jmCg5+cljlyeNs03+cgH+w W+LPm4dTosyilTa+TQsKBywERJAlkofpF1N1S9eSS8GqjP8TdU+8LfC0g3aDyTslDD2J dcYDsX/DsgW4jTMaKt1sYx47m/2G09T3rhoQukh+rsNPjnFIHU1YYhvGsC9bn+8rXy9B zqYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=uBpjsAyPkqDWWizMSZSE7E4tXvlXtOBWhRYVIxu1IPw=; b=B5OxsZAle0cyawEb1IiMye6Ys7O2LTQvImavCeAHlba/ZYqdaggKIgO6SglUlQ4R3J J56X7k7aSr1qyPrC8YByf+Fw4KLxVPYbPIB1ziTTfNqKTIoN177mMLplXYC/mDT09XrS FuGxL/dII/ok8UE1jFf3YVMM6qZV+KZ6gxE0S5aeVnPrPuudS9GLPGUgiGJQWw4rjuBh Mg9riK5v85dgYCQF4HvBdb09vEUWvCUMKfMzha1uG7ke89s8zUj6nEKQuW25TI6dAKmu rBl9CzsTBCZaQZro9GHVbpOHzQg/jTkBXuXVRz71hUmMqpwgt0o52neooJoYcBu13q2c VHvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@eikelenboom.it header.s=20180706 header.b=PN5GSPNg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=eikelenboom.it Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t21-v6si2951656pgn.56.2018.09.27.13.33.57; Thu, 27 Sep 2018 13:34:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@eikelenboom.it header.s=20180706 header.b=PN5GSPNg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=eikelenboom.it Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727444AbeI1Cxu (ORCPT + 99 others); Thu, 27 Sep 2018 22:53:50 -0400 Received: from server.eikelenboom.it ([91.121.65.215]:59386 "EHLO server.eikelenboom.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727265AbeI1Cxt (ORCPT ); Thu, 27 Sep 2018 22:53:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=eikelenboom.it; s=20180706; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=uBpjsAyPkqDWWizMSZSE7E4tXvlXtOBWhRYVIxu1IPw=; b=PN5GSPNgPg0FHCIqURxhT7p8P2 Yu+6uYETYqvJADbqcQiSAUd/DDHD6iAXkaCCmi6Cor3eRUXJc5mdmNVYCjXNYqURIKjpcR1kccJHf d2hFnAEP9YMiZfzHZ7UjcepFmRvOUKAJiseuCGIBOYk/3R9Gejzgvx2p69nkvSek6Cas=; Received: from ip4da85049.direct-adsl.nl ([77.168.80.73]:51568 helo=[172.16.1.49]) by server.eikelenboom.it with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1g5cyh-0006wP-NI; Thu, 27 Sep 2018 22:33:39 +0200 Subject: Re: [Xen-devel] [PATCH] xen/blkfront: When purging persistent grants, keep them in the buffer To: Boris Ostrovsky , Jens Axboe , Juergen Gross , konrad.wilk@oracle.com, roger.pau@citrix.com Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org References: <20180922195549.27953-1-boris.ostrovsky@oracle.com> <28aa9249-7406-21c6-f509-65411828e2d7@suse.com> <5bd1a695-50c6-e79f-38dd-c980fc2138ad@kernel.dk> <00030538-e1ce-28ad-3548-8e3b07083b05@eikelenboom.it> <04bc976c-9991-e24b-4994-55540b06f133@oracle.com> From: Sander Eikelenboom Message-ID: <4f53cd6f-0a73-ccdc-c816-1225aebd8d58@eikelenboom.it> Date: Thu, 27 Sep 2018 22:33:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <04bc976c-9991-e24b-4994-55540b06f133@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/09/18 21:06, Boris Ostrovsky wrote: > On 9/27/18 2:56 PM, Jens Axboe wrote: >> On 9/27/18 12:52 PM, Sander Eikelenboom wrote: >>> On 27/09/18 16:26, Jens Axboe wrote: >>>> On 9/27/18 1:12 AM, Juergen Gross wrote: >>>>> On 22/09/18 21:55, Boris Ostrovsky wrote: >>>>>> Commit a46b53672b2c ("xen/blkfront: cleanup stale persistent grants") >>>>>> added support for purging persistent grants when they are not in use. As >>>>>> part of the purge, the grants were removed from the grant buffer, This >>>>>> eventually causes the buffer to become empty, with BUG_ON triggered in >>>>>> get_free_grant(). This can be observed even on an idle system, within >>>>>> 20-30 minutes. >>>>>> >>>>>> We should keep the grants in the buffer when purging, and only free the >>>>>> grant ref. >>>>>> >>>>>> Fixes: a46b53672b2c ("xen/blkfront: cleanup stale persistent grants") >>>>>> Signed-off-by: Boris Ostrovsky >>>>> Reviewed-by: Juergen Gross >>>> Since Konrad is out, I'm going to queue this up for 4.19. >>>> >>> Hi Boris/Juergen. >>> >>> Last week i tested a linux-4.19-rc4 kernel with xen-next and this patch from Boris pulled on top. >>> Unfortunately it made a VM hang (probably because it's rootFS is shuffled from under it's feet > > What do you mean by "rootFS is shuffled from under it's feet " ? Assumption that block-front getting borked and either a kernel crash or rootfs becoming mounted readonly. Didn't (try) to check though. >>> and it gave these in dom0 dmesg: >>> >>> [ 9251.696090] xen-blkback: requesting a grant already in use >>> [ 9251.705861] xen-blkback: trying to add a gref that's already in the tree >>> [ 9251.715781] xen-blkback: requesting a grant already in use >>> [ 9251.725756] xen-blkback: trying to add a gref that's already in the tree >>> [ 9251.735698] xen-blkback: requesting a grant already in use >>> [ 9251.745573] xen-blkback: trying to add a gref that's already in the tree >>> >>> The VM was a HVM with 4 vcpu's and 2 phy disks: >>> xen-blkback: backend/vbd/14/768: using 4 queues, protocol 1 (x86_64-abi) persistent grants >>> xen-blkback: backend/vbd/14/832: using 4 queues, protocol 1 (x86_64-abi) persistent grants >>> >>> >>> Currently i have been running 4.19-rc5 with xen-next on top and commit >>> a46b53672b2c reverted, for a couple of days. That seems to run stable >>> for me (since it's a small box so i'm not hit by what a46b53672b2c >>> tried to fix. >>> >>> If you can come up with a debug patch i can give that a spin tomorrow >>> evening or in the weekend, so we are hopefully still in time for the >>> 4.19 release. >> At this late in the game, might make more sense to simply revert the >> buggy commit. Especially since what is currently out there doesn't fix >> the issue for you. Don't know if Boris or Juergen have a hunch about the issue, if not perhaps a revert is the best. > If decision is to revert then I think the whole series needs to be > reverted. > > -boris > For Boris and Juergen: Would it make sense to have an "xen-next" branch in the xen-tip tree that is: - based on the previous stable kernel - and has the for-linus branches for the upcoming kernel release on top; - and has the pathes for net(-next) and block changes on top (since these don't go via the tree but only via mailing-list patches); (which are scattered, difficult to track and use for automated testing) - and dependency patches for the above if necessary to be able to build. So there is one branch that can be used to test ALL pending kernel related Xen patches and which could be used in OSStest without as many potential false alarms as linux-next will have ? -- Sander