Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1669429imm; Thu, 14 Jun 2018 01:44:06 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIqb160Yobnti7HJpl+YZZK2lpD68V1gCXYwq6Fr93w9ByDuVgvmbEIgeKZNbVEpAX5n551 X-Received: by 2002:a17:902:9a95:: with SMTP id w21-v6mr2012844plp.168.1528965846596; Thu, 14 Jun 2018 01:44:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528965846; cv=none; d=google.com; s=arc-20160816; b=m4tcF4XoS+iRzXeRxFcB0uiHCc+ngJkL1B3ieoELt/7Aq+Jfc/bZN/gNJct/hEyjqN g/v1sQNNe7R8IoyMVKvCUv7LoLJ0MJC5CqeQul34PE3srQsXFKeCxvk7wKPfTnrrgIHH GB/89nNNOpMyi3E7oCl5reJc9bqCvDb6PQJkZa7S6sWWpPhXXTIqOMLLajyxrtNtEYLb VT2cmnSNF1+mPA8XMT9EUqtMKg82/22X9zW54mCbRePsEYGCBC8sf8cdXpgZHZyenMXv O0ft5O+YSuNDuepCGi48FZs3/GFPO53Zm4Qq32bHV1xrMaSeTx2qM80tPMU1U/n1u1FV fMRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=0Slz+Ec2vbNHsvw6oYl2dz4MbUF+MikMZmheEU6AMDY=; b=XworLUnqIVZkflMfocSdR4iQFAIlbfd1B92n98Ku/IUWEpIobjcN7cIl9tOxj3PuDY n/tDzEgy4Ia0vY0/vy/DAOtev95QWwQQGvYm4B+HfrYIoT6UUeyhsKUf1ovUlar+rJ5N M6aOKuGrs0Vz0JFGuSLNhA2sgmrfgBFo9KK85DZ9LP0bb14TjawD89xtZlQ6+1Rq2iun SDCz3JCbGFJYoqkGCytpzqLvLjLXxBxgxrL8bK0Sv8ypkQhR17WHlNtl7quVlSBs/y+D L/9c5z0oIf1UFPnhpZOC5ibuQ0cPCFhNd8kA1zt5Wi+xia0PXoHwKvqVAr3QKzbhK1qq kdyw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e88-v6si5026165pfk.198.2018.06.14.01.43.52; Thu, 14 Jun 2018 01:44:06 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754703AbeFNInY (ORCPT + 99 others); Thu, 14 Jun 2018 04:43:24 -0400 Received: from smtp.eu.citrix.com ([185.25.65.24]:9125 "EHLO SMTP.EU.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752824AbeFNInW (ORCPT ); Thu, 14 Jun 2018 04:43:22 -0400 X-IronPort-AV: E=Sophos;i="5.51,222,1526342400"; d="scan'208";a="74641745" Date: Thu, 14 Jun 2018 10:43:13 +0200 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Anchal Agarwal CC: , , , , , , , , , , , , , , , , , , , Subject: Re: [RFC PATCH 06/12] xen-blkfront: add callbacks for PM suspend and hibernation Message-ID: <20180614084313.43njg3hbhqoptlqc@mac> References: <20180612205619.28156-1-anchalag@amazon.com> <20180612205619.28156-7-anchalag@amazon.com> <20180613082428.bjdko4k6cnq6eid3@mac> <20180613222048.GB33296@kaos-source-ops-60001.pdx1.amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20180613222048.GB33296@kaos-source-ops-60001.pdx1.amazon.com> User-Agent: NeoMutt/20180512 X-ClientProxiedBy: AMSPEX02CAS02.citrite.net (10.69.22.113) To AMSPEX02CL02.citrite.net (10.69.22.126) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Please try to avoid top posting. On Wed, Jun 13, 2018 at 10:20:48PM +0000, Anchal Agarwal wrote: > Hi Roger, > To answer your question, due to the lack of mentioned commit > (commit 12ea729645ac ("xen/blkback: unmap all persistent grants when > frontend gets disconnected") in the older dom0 kernels(<3.2),resume from This fix that you mention is only present in kernels >= 3.18 AFAICT, and persistent grants where introduced in 3.8 (0a8704a51f38), so anything < 3.8 should work fine. Not sure why you mention 3.2 here. > hibernation can fail on guest side. In the absence of the commit, > Persistant Grants are not unmapped immediately when frontend is > disconnected from backend and hence leave the block device in an > inconsistent state. To avoid this unstability and work with larger set > of kernel versions, this approach had been used. Once you don't have > any pending req/resp it is safer for guest to resume from hibernation. I think the fix should be backported (if it hasn't been done yet) to kernels between 3.8 and 3.18. I don't like to add all this code just to work around a Linux backend kernel bug. AFAICT if persistent grants work as expected you could use almost the same path that's used for migration, greatly reducing the amount of code that you need to add. Thanks, Roger.