Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp7867720pxu; Sat, 26 Dec 2020 07:28:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJxULBWJsFa8BhP2UFWZxywFMQNYLgdd2w1r93coilLkvDeKo274RqggX7+v6Hph4MXdE17z X-Received: by 2002:a05:6402:13d1:: with SMTP id a17mr35392201edx.202.1608996521358; Sat, 26 Dec 2020 07:28:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608996521; cv=none; d=google.com; s=arc-20160816; b=NmGZziF3zVqkRxa15asKxw6c8TErZUvUxbYfBaNm9oe4qoxXiyYI4Fd14usQ9AZH1U vgILtRHSt+fLP8roCpsaSCSocdnpLwU4M2cWzAcWd6wdV6hrR6GKdEjmnL5N3jsBFomC OdXOxX0L1qryUgRQjAD5Ijj6huL6k69rVaJ2mS63BAD1Juy5EgwbiXBvuUKn/a+x9z1T mqeC1KFWpJCGEpe/SiAnTmaGXnx5oye4/BUzgauCA0k/oSDgcT9+ai0hqWahpc+D3OeR eqhk1tLGvUy/ugBPJsaAixEupBCbvAnDhiO0UiJCSKdB/v34Mm1m2swyjC/OmbjB50Is tF+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=xIRdlgq1jjLTt5aUq57YZH004Efua6+AzHdbtC1vjHY=; b=O4468w+qzxwf1t3SpkEvCZbxzHMwW+150IFdYiWWHFAt2vksY5Y9xLIu3/HAqKPk+k rseEEePkx8ac5jXKz9hlZx3llmrbEQoY2p96aZWHSveJhkQVQYp9CnJW7tXe3K0IdxV6 JuFValR3qPQd3hpA2QcFahRBcPOgcFaPEBSCYZe8AHctPBgKkjlgFrw/xHEmqqq2nkOn tekCU9prn3rgfouSsWUC9xBNbS4aPB4AsAc8yQn02bVZaGCrJEH3EQU5lz4ey4S2tb6T ixk57zGHPGFJ4JRmZH+zowiIHCAubAIR97Tfp+MFOlZFfJjXuQzLsHG4oT8xdxNiMMOf hh0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=P9kztiEr; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v7si15968414ejr.236.2020.12.26.07.28.18; Sat, 26 Dec 2020 07:28:41 -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=@gmail.com header.s=20161025 header.b=P9kztiEr; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726257AbgLZP1c (ORCPT + 99 others); Sat, 26 Dec 2020 10:27:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726196AbgLZP1b (ORCPT ); Sat, 26 Dec 2020 10:27:31 -0500 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDE6EC0613C1; Sat, 26 Dec 2020 07:26:50 -0800 (PST) Received: by mail-wm1-x32c.google.com with SMTP id c133so5585099wme.4; Sat, 26 Dec 2020 07:26:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=xIRdlgq1jjLTt5aUq57YZH004Efua6+AzHdbtC1vjHY=; b=P9kztiEr24T4l16RyEqA/W1xXXJ5wEhKXg8GPBu6E1B6wmYxYSXgZdczmd5SS7Hj6T zCwSaXeQ0z4fpETN6Ed0ee5CpglRVp6C2oUxSEFTOTCEcwUSafxiayDQ9gLNVBSUV3Hc Oae93nkcXWv7VldWP8g+uT3Ci6Vf0MLtUYATh3684wA0AXABD6ssiNC+rfwT7hcEEWjm A4XYXyZuti0vZ3H8ucWge5x7U8lAOaA4Ww8tbHnQLsB+r72cIIZ01v/GPm65HnirgfcG ZzDChtbPfXOrcqlV/pTEc2CqvMNWL1Hfel/yg2ECJ2sN7VvY3PhRy8SoNKdZzMHvLWOv PSFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=xIRdlgq1jjLTt5aUq57YZH004Efua6+AzHdbtC1vjHY=; b=eX12yiGHQ9Kkj07CmclQXiWPKWHZuSuZL9oe4qhE9bpqFqlH7m86r8OjTFwEkcupiS 1ierRaVxTMidgbLMF3GE9kb3m5TLd+dKgD1siWAMEaQcy0qMRtIjvWybg634JSrdN/ar ONKTsXnDk074Wm01qIqKT0dBjaHwY46rgHgFNZsMl/810WkJ4i9s6M0pgLpxwIelStnl RkP9hhVmIHFRE0shYRCT+tdAiaotVO3xRQmyWC/BlOCuP4I++4SRQVOlLrpljAT/AvBM jc5Ft0Oy8uNOI3Psk/P08Gur84q9zRqAJ9ZFihwAYz4zKy8g+Rat20knMmOZrrBkcS8I UetA== X-Gm-Message-State: AOAM531F7wNJHoQzB/G//nC71NJO619nYmI+twedDRX3SECzaYnAGRdK gZ09KDYd1lgKGZMBUSCuwniG1kzXSwo= X-Received: by 2002:a1c:287:: with SMTP id 129mr12961595wmc.133.1608996409251; Sat, 26 Dec 2020 07:26:49 -0800 (PST) Received: from ?IPv6:2003:ea:8f06:5500:7d77:5a5b:aeb8:2b9f? (p200300ea8f0655007d775a5baeb82b9f.dip0.t-ipconnect.de. [2003:ea:8f06:5500:7d77:5a5b:aeb8:2b9f]) by smtp.googlemail.com with ESMTPSA id v20sm12423907wml.34.2020.12.26.07.26.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Dec 2020 07:26:48 -0800 (PST) Subject: Re: Time to re-enable Runtime PM per default for PCI devcies? To: "Rafael J. Wysocki" , Bjorn Helgaas Cc: "Rafael J. Wysocki" , Bjorn Helgaas , Mika Westerberg , Kai Heng Feng , Lukas Wunner , "linux-pci@vger.kernel.org" , Linux PM , Linux Kernel Mailing List References: <79940973-b631-90f9-dbc4-9579c6000816@gmail.com> <20201117163817.GA1397220@bjorn-Precision-5520> From: Heiner Kallweit Message-ID: Date: Sat, 26 Dec 2020 16:26:39 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17.11.2020 17:57, Rafael J. Wysocki wrote: > On Tue, Nov 17, 2020 at 5:38 PM Bjorn Helgaas wrote: >> >> [+to Rafael, author of the commit you mentioned, >> +cc Mika, Kai Heng, Lukas, linux-pm, linux-kernel] >> >> On Tue, Nov 17, 2020 at 04:56:09PM +0100, Heiner Kallweit wrote: >>> More than 10 yrs ago Runtime PM was disabled per default by bb910a7040 >>> ("PCI/PM Runtime: Make runtime PM of PCI devices inactive by default"). >>> >>> Reason given: "avoid breakage on systems where ACPI-based wake-up is >>> known to fail for some devices" >>> Unfortunately the commit message doesn't mention any affected devices >>> or systems. > > Even if it did that, it wouldn't have been a full list almost for sure. > > We had received multiple problem reports related to that, most likely > because the ACPI PM in BIOSes at that time was tailored for > system-wide PM transitions only. > To follow up on this discussion: We could call pm_runtime_forbid() conditionally, e.g. with the following condition. This would enable runtime pm per default for all non-ACPI systems, and it uses the BIOS date as an indicator for a hopefully not that broken ACPI implementation. However I could understand the argument that this looks a little hacky .. if (IS_ENABLED(CONFIG_ACPI) && dmi_get_bios_year() <= 2016) >>> With Runtime PM disabled e.g. the PHY on network devices may remain >>> powered up even with no cable plugged in, affecting battery lifetime >>> on mobile devices. Currently we have to rely on the respective distro >>> or user to enable Runtime PM via sysfs (echo auto > power/control). >>> Some devices work around this restriction by calling pm_runtime_allow >>> in their probe routine, even though that's not recommended by >>> https://www.kernel.org/doc/Documentation/power/pci.txt >>> >>> Disabling Runtime PM per default seems to be a big hammer, a quirk >>> for affected devices / systems may had been better. And we still >>> have the option to disable Runtime PM for selected devices via sysfs. >>> >>> So, to cut a long story short: Wouldn't it be time to remove this >>> restriction? >> >> I don't know the history of this, but maybe Rafael or the others can >> shed some light on it. > > The systems that had those problems 10 years ago would still have > them, but I expect there to be more systems where runtime PM can be > enabled by default for PCI devices without issues. >