Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5428430yba; Mon, 13 May 2019 10:38:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHVIcNjTzrGevCTasXa29BjO8aqNQ+4AqOq/w+MOt+CRX94LHuv3RvW/LJhAhzScXYrWFo X-Received: by 2002:a62:604:: with SMTP id 4mr35080322pfg.38.1557769120922; Mon, 13 May 2019 10:38:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557769120; cv=none; d=google.com; s=arc-20160816; b=0UYri+RsPKKwL8xy//RARwuX/1QFO/f4Vwg7bXdhkaFXK2AkcgndCuGR4+pva2F38x ecNuZkF5AXarMgaLOqOsKJRht4QL+JOKmZ2uFiN3QVjLC+adENlf7uVIf46VQceZwYKK D43I7QjINSU3sF0nDgrBgWAduDBam0RUHis+nTlq9FVphUqNMIak8Gv/IACGk8NSzZAj rCl7/jdVWhzct8utW5kMnJbCLxWBWUw/PQcad26Fp8ZLGd9kUWWMIlzqR3d8zSwb+V2A kB7mKVXbI/ojt71YWGcmMw9LWo7aaokuOD3tbdra0d3sOHacc8TOx0gz/NkPJT+1uPPQ DQkg== 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; bh=xnRMFyWdqB0VKcsrAYQXGpQpldA8YHexhNirp/AW2lQ=; b=JLezKT2Qg4prHk5m0sJzf3UCtsS9mO8AaD0sOvYh6zpikLgHN3X+6x2djxgf2JZ6eE Y/g5sVWwf7X6xA8wkwbs3flJjYHhYf/XsZ77cPJwR2Md7W8Y+nXrmPMwwtUo6fWnXQxj atu5KBHLbfTN+CKaJXai6Tvd6e0ey0opJtCr3h+szWWKHKTw8cPe7XVJSMh9PVAcb0v/ p733y7PZrQPj7mwbTZh+8X1F+VAY5yh/pOdYyw0LF3t8LSvqnoz7t5yJd4cdkhYqg2g/ ZOEGNfL7DCQSMeWwtUeBf9bK0ao1gd50udQLSdg+bMf+2Fmfn8KltsPi0o3BX/9i0bVR 2THg== 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 f193si18499821pgc.144.2019.05.13.10.38.24; Mon, 13 May 2019 10:38:40 -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 S1729931AbfEMOiD (ORCPT + 99 others); Mon, 13 May 2019 10:38:03 -0400 Received: from verein.lst.de ([213.95.11.211]:39685 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727970AbfEMOiC (ORCPT ); Mon, 13 May 2019 10:38:02 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 5F47768AFE; Mon, 13 May 2019 16:37:41 +0200 (CEST) Date: Mon, 13 May 2019 16:37:41 +0200 From: Christoph Hellwig To: Mario.Limonciello@dell.com Cc: keith.busch@intel.com, hch@lst.de, sagi@grimberg.me, linux-nvme@lists.infradead.org, rafael@kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, kai.heng.feng@canonical.com Subject: Re: [PATCH] nvme/pci: Use host managed power state for suspend Message-ID: <20190513143741.GA25500@lst.de> References: <20190510212937.11661-1-keith.busch@intel.com> <0080aaff18e5445dabca509d4113eca8@AUSX13MPC105.AMER.DELL.COM> <955722d8fc16425dbba0698c4806f8fd@AUSX13MPC105.AMER.DELL.COM> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <955722d8fc16425dbba0698c4806f8fd@AUSX13MPC105.AMER.DELL.COM> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 13, 2019 at 02:24:41PM +0000, Mario.Limonciello@dell.com wrote: > I've received the result that from one of my partners this patch doesn't > work properly and the platform doesn't go into a lower power state. Well, it sounds like your partners device does not work properly in this case. There is nothing in the NVMe spec that says queues should be torn down for deep power states, and that whole idea seems rather counter productive to low-latency suspend/resume cycles. > This was not a disk with HMB, but with regard to the HMB I believe it > needs to be removed during s0ix so that there isn't any mistake that SSD > thinks it can access HMB memory in s0ix. There is no mistake - the device is allowed to use the HMB from the point that we give it the memory range until the point where we either disable it, or shut the controller down. If something else requires the device not to use the HMB after ->suspend is called we need to disable the HMB, and we better have a good reason for that and document it in the code. Note that shutting down queues or having CPU memory barriers is not going to help with any of that.