Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5294971pxj; Wed, 26 May 2021 07:24:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAPxPDP+0zHO+ioPhGGa+CRMi8XxJvFdaMKsPNoLdA4OELEGMCxuJoeZDr33nMmvNDs5nq X-Received: by 2002:a05:6e02:c6d:: with SMTP id f13mr8327660ilj.276.1622039041096; Wed, 26 May 2021 07:24:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622039041; cv=none; d=google.com; s=arc-20160816; b=Ly/B/RBeaOuHrwvNZFuEmv8MZhU/ql0GMf+zxOSxzggDKTFLEVRRA5VWVFE4UAcZqu fdSzHNPu6KYB+i6tU6/t7Ds/v6MsLwqUmfptBYVAAVn7MGzslE48eF1l6EyGBZSvUhYi UqqZZaKKPJd/uB1FXfwgjI2/JiYtwF/7eNnMf01FmeQx6zJZjy2299y77yKdyn6BZnze pKOODolMyvNi5DN5ohyD2XKmSkHieeAR8bddwEpViaRr7rMzRtAMEzUoEJlthz9IdHQf FxAnEhfKHxFfVMQiDK7xtJ619rfCAV0A9pPFIb7GHLmH22QB+UFNXvS18aNizoHyeOI2 kETw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=KRO+7j/5yLVMVQTeKppilXzCeyP1PjLQ0t5VspLhv9A=; b=JUQtzBuI1Pnx6pSLPscSpolayYleU+bRg6uSU4EtVjCDQ0Ksstfb6qgQZvMPEswPUT PkpGEvLguZ1X7+agvjt6C5/KxLIetIJPyCmOfSjub6m6CpRtPvdvq29aqE/y5U+lEesT hg7eY+yYvEF7KNPLehBXGJqg9kYiLffWaA5xIY4rLipa/wc9A55nJIXbDFINlD42XW5Z t637baInV7+Vx99uPOCmEtOh91TRVQbJ1aJeZiIdy8RSmo8kx1CU2ULjel7feKSyYKz3 pjWEYoEn/0tmOHhGXSOZwZeDGtEQsVgk7yJl4JgdSMeI0FIZEwmtUuGfA4vKghlgY4mF rrYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o10si20912281ilc.147.2021.05.26.07.23.47; Wed, 26 May 2021 07:24:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234657AbhEZOXq (ORCPT + 99 others); Wed, 26 May 2021 10:23:46 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:59824 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234670AbhEZOXp (ORCPT ); Wed, 26 May 2021 10:23:45 -0400 Received: from mail-lj1-f198.google.com ([209.85.208.198]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lluQH-00082n-9Q for linux-kernel@vger.kernel.org; Wed, 26 May 2021 14:22:13 +0000 Received: by mail-lj1-f198.google.com with SMTP id b35-20020a2ebc230000b02900e586a5ceaeso556383ljf.13 for ; Wed, 26 May 2021 07:22:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KRO+7j/5yLVMVQTeKppilXzCeyP1PjLQ0t5VspLhv9A=; b=hZJtRn5eLqHI7RgXQgzsNswhXO8fhDm/cOXTGo6Ac2Swr2FAGbQEa95UBg/91SifYL wwsZlMVGh4WMdAy4xhrMMHQzsW9Xmi4vKTfltZJgCpUQJ1zy8ryAK2L9JBU3bAh5h0/j cYn5ghG/4H6Gdlx0k51rNGpEreVMTiMkJkXaVxgC++VZCAOCe8knkzpWyzCFSncFwri/ 7SJhF7iNSEP4b3bv36my77lwqrzUeWJV3kqDfwxpocOkTq4g270ox4uKZlW9ByWM8tT8 LLiv7NzhIovuZmcZGSF69LQsQpn2oi84k7uo91lWHJGO8+73AKDQEW8/FSGDAjDkcgYE xbOg== X-Gm-Message-State: AOAM533xQCuEXNaOrJghKnpn1coh047g+Gf4NVVPvC/Jxe2Bw1uAR4oN ZnQd8jZYxTHPckq/atOY73ntUYWi54AWEyCg33btw57ou5ITNwAu0JJb7R93Sp0BDeLh2j6mo/Q MdnpttfIEl7byQzBSelxKlPNfZdhNrhAWPlCDqBoP6GZwGNIfE+PyA5stBg== X-Received: by 2002:a05:6512:3488:: with SMTP id v8mr2271803lfr.622.1622038932740; Wed, 26 May 2021 07:22:12 -0700 (PDT) X-Received: by 2002:a05:6512:3488:: with SMTP id v8mr2271787lfr.622.1622038932348; Wed, 26 May 2021 07:22:12 -0700 (PDT) MIME-Version: 1.0 References: <20210520033315.490584-1-koba.ko@canonical.com> <20210525074426.GA14916@lst.de> <20210526024934.GB3704949@dhcp-10-100-145-180.wdc.com> <20210526125942.GA25080@lst.de> In-Reply-To: <20210526125942.GA25080@lst.de> From: Kai-Heng Feng Date: Wed, 26 May 2021 22:21:59 +0800 Message-ID: Subject: Re: [PATCH] nvme-pci: Avoid to go into d3cold if device can't use npss. To: Christoph Hellwig Cc: Keith Busch , Koba Ko , Jens Axboe , Sagi Grimberg , linux-nvme , Linux Kernel Mailing List , Henrik Juul Hansen , Bjorn Helgaas , Linux PCI Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 26, 2021 at 8:59 PM Christoph Hellwig wrote: > > On Wed, May 26, 2021 at 08:11:41PM +0800, Kai-Heng Feng wrote: > > On Wed, May 26, 2021 at 10:49 AM Keith Busch wrote: > > > > > > On Wed, May 26, 2021 at 10:02:27AM +0800, Koba Ko wrote: > > > > On Tue, May 25, 2021 at 3:44 PM Christoph Hellwig wrote: > > > > > > > > > > On Thu, May 20, 2021 at 11:33:15AM +0800, Koba Ko wrote: > > > > > > After resume, host can't change power state of the closed controller > > > > > > from D3cold to D0. > > > > > > > > > > Why? > > > > As per Kai-Heng said, it's a regression introduced by commit > > > > b97120b15ebd ("nvme-pci: > > > > use simple suspend when a HMB is enabled"). The affected NVMe is using HMB. > > > > > > That really doesn't add up. The mentioned commit restores the driver > > > behavior for HMB drives that existed prior to d916b1be94b6d from kernel > > > 5.3. Is that NVMe device broken in pre-5.3 kernels, too? > > > > Quite likely. The system in question is a late 2020 Ice Lake laptop, > > so it was released after 5.3 kernel. > > This is just a mess. We had to disable the sensible power state based > suspend on these systems because Intel broke it by just cutting the power > off. And now the shutdown based one doesn't work either because it can't > handle d3cold. Someone we need to stop Intel and the integrators from > doing stupid things, and I'm not sure how. To be fair, resuming the NVMe from D3hot is much slower than keep it at D0, which gives us a faster s2idle resume time. And now AMD also requires s2idle on their latest laptops. And it's more like NVMe controllers don't respect PCI D3hot. > > But degrading all systems even more is just a bad idea, so I fear we'll > need a quirk again. Can you figure out by switching the cards if this > is the fault of the platform or the nvme device? Here's the original bug report: https://bugs.launchpad.net/bugs/1912057 Because the NVMe continues to work after s2idle and the symbol is rather subtle, so I suspect this is not platform or vendor specific. Is it possible to disable DMA for HMB NVMe on suspend? Kai-Heng > > > > > Kai-Heng > ---end quoted text---