Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5348205yba; Mon, 13 May 2019 09:20:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqwG9RQCjvzSIin1zSwdAQnrYIW4iFIcbpuyP/Z8FF3ZUx25zKRUFl/WJcYbt01RMC1V7ngq X-Received: by 2002:aa7:842f:: with SMTP id q15mr34606862pfn.161.1557764403086; Mon, 13 May 2019 09:20:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557764403; cv=none; d=google.com; s=arc-20160816; b=urubnyDQwKLvB1RX9cIdSoB0YK9iPltF78Thh0divgeNniFU63bwHAFBHNim9/BF38 ecijoP5TcGk/q5vWkgwGNWI0jPuqOibivLBtVCtzLHlFR5i7sKIZJVaYg7cmlDxQDvWD rXZQfPIhkv0GDUIPW0Pf7G8dJGhxjsEil+jxBsJlv/61kyC9qcQJO9sp/6o5R0pAC5B/ nggpK9VDAGk5emqrwkX/9wdCRCKkGALevHXHwlchyKJzPgjD5YPBZItPzAGXsBW6szRf 8dv11WBUhRwz5q5NJx0xjn24VAHTRArgWv4GVFOBUKSg4h1IFmhsfuo2RQKuQFWbwFdO RSjw== 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=9ZNMYTbsNy8LeIZI9kgcf2VzIpPMgyqZvk6v3hasXm8=; b=qnpltS/kL/fmT6FaTwIUq8LqVSvy/7N6fpxWtG32V/IjAAlFpbE4hXIIY6AN0Gh2XQ 4lACVnFgpKBtS0fPM4sLFbD0Lqe0qBHrLarknSr6tIMDhAirUJSyvl8qECq6XulCHpT8 b3oDXzPUNkQEmTuIG6IrkBOwiV/k8Hb0hKprip6I/JiKvetqGUfo4ROYAVsHAqxAmvbt BPt5LH0VOvDWY9TKSVwjLg4OWN3sSqyDgETg0a7h9x0vnairDJ+dVWw+klCPXdlYpLY6 Zj7qA/S/43I+mef7Pvugc6kkm5geyi3aEnAzvSsdGIX5Jb5KC0PtdkftYId3sXpZaNuT KqJA== 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 bf6si16272685plb.113.2019.05.13.09.19.47; Mon, 13 May 2019 09:20:03 -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 S1731072AbfEMO5b (ORCPT + 99 others); Mon, 13 May 2019 10:57:31 -0400 Received: from verein.lst.de ([213.95.11.211]:39834 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729602AbfEMO53 (ORCPT ); Mon, 13 May 2019 10:57:29 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 4F4D368AFE; Mon, 13 May 2019 16:57:08 +0200 (CEST) Date: Mon, 13 May 2019 16:57:08 +0200 From: Christoph Hellwig To: Mario.Limonciello@dell.com Cc: kbusch@kernel.org, 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: <20190513145708.GA25897@lst.de> References: <20190510212937.11661-1-keith.busch@intel.com> <0080aaff18e5445dabca509d4113eca8@AUSX13MPC105.AMER.DELL.COM> <955722d8fc16425dbba0698c4806f8fd@AUSX13MPC105.AMER.DELL.COM> <20190513143754.GE15318@localhost.localdomain> <7ab8274ef1ce46fcae54a50abc76ae4a@AUSX13MPC105.AMER.DELL.COM> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7ab8274ef1ce46fcae54a50abc76ae4a@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:54:49PM +0000, Mario.Limonciello@dell.com wrote: > The Intel DMA controller suspend callbacks in drivers/dma/idma64.c look to me to > turn off the controller. How is that relevant? That thing is neither a NVMe controller, nor even an PCIe device.. > And NVME spec made it sound to me that while in a low power state it shouldn't > be available if the memory isn't available. > > NVME spec in 8.9: > > "Host software should request that the controller release the > assigned ranges prior to a shutdown event, a Runtime D3 event, or any other event > that requires host software to reclaim the assigned ranges." The last part of the quoted text is the key - if the assigned range is reclaimed, that is the memory is going to be used for something else, we need to release the ranges. But we do not release the ranges, as we want to keep the memory in use so that we can quickly use it again.