Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp692329pxb; Fri, 28 Jan 2022 08:05:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJxMiLRbh8ATI7Mbbe28cqp/Yg9zreop9EFzMwRTjzvt/Roy5mkITGCzCrDjYpo9yCP0q8XO X-Received: by 2002:aa7:d944:: with SMTP id l4mr8774939eds.117.1643385931348; Fri, 28 Jan 2022 08:05:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643385931; cv=none; d=google.com; s=arc-20160816; b=Ckdeh9iCV469uIXvYN08ALCTpLWWFU7mlutLxMYOP6IluU8MHoWfwCmTBjjSWHA0Us RSKmwRLoZJm1R4+/nEOIKScto5xqR7AzVjBJ12yNfbiFXpKIDrpnrWQWUUeK7CjC+Xiy 7jS3gy4M1f7Ag7Ja/gxhXnGy6188Dy/zWOuXXMsKZVNdNcLfdPpn5mPZDa0yWI0yYWwa EsweBd97hXsih1it4xhna6EMOzYmQ8+VJ9hizkvkR91uQjdALQOvT+GlZze/iKDpr1Ra EOK5ElmQ3oAEaQSZ1zCErzmBP9aQ+ixNpUPzLCFukofWMwR7u9XovSLXAOd8242A6Al/ EMOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0GypiHZ5EzrfkJKtClbwMV9ZW0JSnWa3hN1AAnzHRMA=; b=HBjq4SBA4tTN2ETTb5oq0jAIDX7RJk/RX7GZ5UAGaigMafS5tcm4dplO983zR58r+0 7FkEFuaPl7V6oWw/1CP7i8Dc+H63iGlgJuT3bLzeTtpCWanvL4Au0PFbZVIDcufoJoCt BWPjlFGUaBK1fkooMwSsmIuP3I0TZpfs/B1QkPTDZlbOKYb3U/pN82XcnySP6c+IdUqz 8tnSp/a0L/r7U91evsySp4SwA44f2D3Vp2I6+Pzg8wiqfdXg75zndYxNRF4ahgoAiEEf HqEqTmIfzUDStX8yTwHextK8rTlDXlGDJLiTeC4HiJBsSsOniaUhcegx2Xf0qec/NFoL 680Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XvT4pQwb; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m24si3017611ejn.426.2022.01.28.08.05.05; Fri, 28 Jan 2022 08:05:31 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XvT4pQwb; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245080AbiA0TaH (ORCPT + 99 others); Thu, 27 Jan 2022 14:30:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232674AbiA0TaF (ORCPT ); Thu, 27 Jan 2022 14:30:05 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C0EFC061714; Thu, 27 Jan 2022 11:30:05 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0A797B801BC; Thu, 27 Jan 2022 19:30:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 34D32C340E6; Thu, 27 Jan 2022 19:30:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643311802; bh=h7RLlmrK1ZqpidaqT0+vY1g9r/JOfPqZK246ZufEcyo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XvT4pQwbN2WqLd9pqWxbb7WRi2DRoBIfDFKG30HcBk6cth+Da4jNciI/FwEuYEz9m zvIJWGVP6M0lu54rCSUgWmi9Yc6BWXq2pwIyaS/at5QlCSaH3pIjoOXuYRZZkmwD3x 1MnjRKK6Qx0Wh9e+PE1KJPvBuqbroYgy+Q/va2kHnEaIHxBJcNaBIewZ/erzHjjAd8 ogOZLGYxg6jjn4Sy4znokzGZdYhKJYg2iXNCzoMK7nMYAt428HzkpYmYZ/JS7C2J0S rqtjVUzw2FobSW2tFojkXNkCoSw82b7Xu0h/K48VT969JEqNjsfdLmBATYVCkX2azj euGByabZaZ+8Q== Date: Thu, 27 Jan 2022 11:30:00 -0800 From: Keith Busch To: "Rafael J. Wysocki" Cc: Sagi Grimberg , Christoph Hellwig , Len Brown , Linux PM , Linux Kernel Mailing List , m.heingbecker@googlemail.com, linux-nvme Subject: Re: [Bug] nvme blocks PC10 since v5.15 - bisected Message-ID: <20220127193000.GC2266713@dhcp-10-100-145-180.wdc.com> References: <20220121210905.GA1114868@dhcp-10-100-145-180.wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 27, 2022 at 08:02:07PM +0100, Rafael J. Wysocki wrote: > On Fri, Jan 21, 2022 at 10:09 PM Keith Busch wrote: > > > > On Fri, Jan 21, 2022 at 08:00:49PM +0100, Rafael J. Wysocki wrote: > > > Hi Keith, > > > > > > It is reported that the following commit > > > > > > commit e5ad96f388b765fe6b52f64f37e910c0ba4f3de7 > > > Author: Keith Busch > > > Date: Tue Jul 27 09:40:44 2021 -0700 > > > > > > nvme-pci: disable hmb on idle suspend > > > > > > An idle suspend may or may not disable host memory access from devices > > > placed in low power mode. Either way, it should always be safe to > > > disable the host memory buffer prior to entering the low power mode, and > > > this should also always be faster than a full device shutdown. > > > > > > Signed-off-by: Keith Busch > > > Reviewed-by: Sagi Grimberg > > > Signed-off-by: Christoph Hellwig > > > > > > is the source of a serious power regression occurring since 5.15 > > > (please see https://bugzilla.kernel.org/show_bug.cgi?id=215467). > > > > > > After this commit, the SoC on the affected system cannot enter > > > C-states deeper than PC2 while suspended to idle which basically > > > defeats the purpose of suspending. > > > > > > What may be happening is that nvme_disable_prepare_reset() that is not > > > called any more in the ndev->nr_host_mem_descs case somehow causes the > > > LTR of the device to change to "no requirement" which allows deeper > > > C-states to be entered. > > > > > > Can you have a look at this, please? > > > > I thought platforms that wanted full device shutdown behaviour would > > always set acpi_storage_d3. Is that not happening here? > > Evidently, it isn't. > > Also that flag is about putting the device into D3, which need not be > necessary as long as the LTR is set to "don't care". The only NVMe spec guidance for a driver to initiate a controller shutdown is to prepare for D3 transition. If this platform wants a full device shutdown without D3, then I think we may need a quirk. We did a shutdown before because we didn't know any better and it's the safeset thing to do. That caused complaints for excessive resume latency, so now we have a platform indicator to tell us if we should, and we rely on that. Are you suggesting we instead consult the PCIe LTR in addition to ACPI storage properties?