Received: by 10.223.185.116 with SMTP id b49csp983456wrg; Tue, 20 Feb 2018 11:03:21 -0800 (PST) X-Google-Smtp-Source: AH8x224URGzqgKVkeAHu4JADU41aPfWcYvKVBy15xY/Ib3OchR/5EcZoyR6PrZrN8XyezJJ//nBf X-Received: by 2002:a17:902:b787:: with SMTP id e7-v6mr561198pls.317.1519153401547; Tue, 20 Feb 2018 11:03:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519153401; cv=none; d=google.com; s=arc-20160816; b=AW3wlBLBcnQCnHjoj4Y69Ay0aTp9C6j388ty1e9C8MRpQJImOjij7z/PKyIEjRT0tP 6AL7hKKYO5bBo7hKL7EoFmgZzHFg6gzXIPVFr0ahDUUhNoPoblBLj7AbYsxad7x21scY ySxJqR32LlY7RrAt8wiiK44GiKLnFH9K7hfU+gDonS17n2Uz/WnIv4Ts3CfQaAVjOntM z9Otzc8+gXcAKS71YKGk35ybt3ZiPzjB1KrTOqmliSojIRDbQVLSP8UdDaI73FUb+4MF TPjTkAV+umqhVtQcDXyV4n+a3/O+PKc5wtWzfdWCUKi29+jO8nSHMClXO7KUrlwo++0P f6Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=AewpDx5e0uBsUb08oBZhtWYDhcu3lZRijC+r24PILa4=; b=VtLdACdnlW6pAMk33KUYgiEtc9wkcqmEokG52CbOUk3lbqaCnRgfSGM+GiyBq+05oY ng3blsZpVxwb3Wj+lXyu77Y3H+puZzcz9KFrI1EMN0KLXHl5s4ZugDPot5t2HzBBN22/ IyD/Dy/CU1ovcpccZRiwR/cGe11xIsOiKIeX0nj/+c4lRKbsBCVfCH96uL2O0Lc6f1K6 l7lUlS4IsF5Q8c31Ac+bDjVuYECkJTaJNfsSRzDYFR9ilaznoAwXa4FbQ5mBkZM9h3bl ybxwBb9O7pA4vwm1H7RXHFVszU0As4+LdGGHqUWzi/C8wKJP3yVEvlmhF8Odko73duhN lXEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=aVN8feW/; 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 s190si5383175pgc.510.2018.02.20.11.03.06; Tue, 20 Feb 2018 11:03:21 -0800 (PST) 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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=aVN8feW/; 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 S1752109AbeBTTBA (ORCPT + 99 others); Tue, 20 Feb 2018 14:01:00 -0500 Received: from mail-oi0-f53.google.com ([209.85.218.53]:36561 "EHLO mail-oi0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751447AbeBTTA6 (ORCPT ); Tue, 20 Feb 2018 14:00:58 -0500 Received: by mail-oi0-f53.google.com with SMTP id 24so10260172oij.3; Tue, 20 Feb 2018 11:00:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=AewpDx5e0uBsUb08oBZhtWYDhcu3lZRijC+r24PILa4=; b=aVN8feW/tm7rB49O+Uvj1BO255pJ+2o+mf6eBCUQQQy7YvRuvnL8g91HbTdSgI1RmX qEwDUi/J7LuYhsdrknGW7aX14Zvv8p2mgFCWR3RpnV50Typ0GtnBKNcpulnbg7qtGJpd Af6A2G3NHSqsQ0rzIPF+gDJicvRgiRivCO/4USIvFiIu4/910a3EiQ/2BV4cXdE0gmUq R3dImr52dlRKcyj0Pm7V5jsQkGmNCUvMg0hbaM7DlBoE3IUXNdf3/CvKCIi3xFt9/uoQ ZwcDFnRmowWulFDhsD0W6Vw8J0JntFwVgbL/rdu3tRAsSAIQiT/GwW57DJ2kH430bdue Lofw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=AewpDx5e0uBsUb08oBZhtWYDhcu3lZRijC+r24PILa4=; b=VyTzS2gdSLb8aoZ4eKxmu0WjbVcPgoxf7+KUPmEXcPNBsptU8FfOwmSx4YlwIbxZiJ VLfcihIKTN3QJL2Xm7zp3doIl36kU2P1ynOmN0wivEueTG75AT+PF4v4aFkJWTo2qNUE jYN+GDFRyVRQ7s8RW4P0a09bwVb7uioJOtskNPhIjT5PPd0+lC5YcGGRI/pyA0cZvHyx LdAVQ8ah1oBkWmu41uBKgm1yXsqJ4dvqvbOY4pwixRDAkne87ywvnAvo/M3NXU7r/wwG +ZXyrGWFw8d9e1SgSxkMq46Dg6c5Rsi4sZGSvcKw9sW57ZmHaKJgAbrx4c1B0pdu5Dps UC1Q== X-Gm-Message-State: APf1xPBoPGyZgGx1K/ThlyrcG+62xeRE3KYci7Bxb6dhOmYY3L8z+OLf iodgvMbxnBTJCKkd+HA8E0/dMOdvarLBBtvkQZA= X-Received: by 10.202.83.73 with SMTP id h70mr451324oib.154.1519153257790; Tue, 20 Feb 2018 11:00:57 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.44.146 with HTTP; Tue, 20 Feb 2018 11:00:57 -0800 (PST) In-Reply-To: <20180220181554.GA32228@bhelgaas-glaptop.roam.corp.google.com> References: <151908155159.37696.9710083237704994886.stgit@bhelgaas-glaptop.roam.corp.google.com> <151908204614.37696.12828004282495415825.stgit@bhelgaas-glaptop.roam.corp.google.com> <20180220181554.GA32228@bhelgaas-glaptop.roam.corp.google.com> From: "Rafael J. Wysocki" Date: Tue, 20 Feb 2018 20:00:57 +0100 X-Google-Sender-Auth: kaSZx6POIEYtStq-ivlgwpAtDI8 Message-ID: Subject: Re: [PATCH v1 2/2] PCI: Allow user to request power management of conventional and hotplug bridges To: Bjorn Helgaas Cc: "Rafael J. Wysocki" , Linux PCI , Valdis Kletnieks , Mathias Nyman , Linux PM , Mika Westerberg , "Rafael J. Wysocki" , Linux Kernel Mailing List , Lukas Wunner , Peter Wu , Qipeng Zha , Greg Kroah-Hartman , Andreas Noever , Dave Airlie , Qi Zheng Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 20, 2018 at 7:15 PM, Bjorn Helgaas wrote: > On Tue, Feb 20, 2018 at 10:41:33AM +0100, Rafael J. Wysocki wrote: >> On Tue, Feb 20, 2018 at 12:14 AM, Bjorn Helgaas wrote: >> > From: Bjorn Helgaas >> > >> > Previously "pcie_port_pm=force" enabled power management of PCI bridges, >> > but only for PCIe ports (not conventional PCI bridges) and only for ports >> > that do not support hotplug. Those limitations are there because we're not >> > confident that all those configurations work, not because the spec requires >> > them. >> > >> > Change "pcie_port_pm=force" to enable power management of conventional PCI >> > bridges and hotplug bridges as well as PCIe ports. As with the previous >> > PCIe port-only behavior, this is not expected to work in all systems. >> > >> > Add a "pci=bridge_pm" parameter to reflect the increased scope. For >> > backward compatibility, retain "pcie_port_pm=force" as an undocumented >> > equivalent. >> > >> > Add "pci=no_bridge_pm" as an equivalent to "pcie_port_pm=off". This >> > disables power management for all PCI bridges, which is results in the same >> > behavior as before, since we always disabled power management of >> > conventional PCI bridges, and "pcie_port_pm=off" disabled it for PCIe >> > ports. >> > >> > Signed-off-by: Bjorn Helgaas >> >> Honestly, I wouldn't do that, at least not this way. >> >> Somebody might be using pcie_port_pm=force already, for example, and >> it works for them for PCIe, but the PCI-to-PCI part of the same system >> may not. > > Yes, you and Valdis are right, this is over-aggressive and I'll drop > it. > >> IMO the behavior of pcie_port_pm= should be as is and I don't see >> what's wrong with it being documented. >> >> Of course, you can add pci=bridge_pm/no_bridge_pm to extend the scope, >> but for what reason really? Just to follow the letter of the spec? > > Basically I was hoping to partially rectify what I think was a mistake > on my part when we merged this. 9d26d3a8f1b0 ("PCI: Put PCIe ports > into D3 during suspend") is somewhat misleading because it suggests > that PCI bridge power management can only be supported on non-hotplug > PCIe ports, when in fact this was mostly a question of testing and "we > know this works on the systems we care about so we're going to > minimize our risk by excluding others". These constraints seem pretty > Intel-centric and it's not clear how or whether they apply to other > architectures. > > Adding the comments will help with that some, but in general I don't > like to artificially limit feature support because it reduces testing > exposure and makes future maintenance more difficult. > > For example, we disallow D3 for hotplug bridges. I don't think the > spec requires that, so the fact that we put that limitation in > suggests that there was some issue we didn't fully understand, and now > it will be hard to go back and figure that out if and when we *do* > want to support D3 for hotplug bridges. In this particular case we just wanted to limit the scope of changes to what we were able to test at that time. You seem to be arguing that the target coverage for a new feature should always be maximum, because that makes future maintenance easier. While that might be the case, it places a lot of burden on the developer who introduces the feature to also cover systems they may not have access to and causes the test matrix to increase significantly. I prefer to limit the initial scope of changes to a set of systems that can be tested and validated in a specific time frame as that is much more friendly to developers working on the features in question. It's just a different development strategy and it is generally applicable regardless of which company the given developers work for IMO. > Anyway, I'll drop this one and just go with adding the comments. Thanks!