linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Frederick Lawler <fred@fredlawl.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [PATCH RFC 3/3] PCI/ASPM: add sysfs attribute for controlling ASPM
Date: Tue, 30 Apr 2019 12:53:04 -0500	[thread overview]
Message-ID: <20190430175304.GC145057@google.com> (raw)
In-Reply-To: <a0a39450-1f23-f5a0-d669-3d722e5b71dd@gmail.com>

On Sat, Apr 13, 2019 at 11:12:41AM +0200, Heiner Kallweit wrote:
> Background of this extension is a problem with the r8169 network driver.
> Several combinations of board chipsets and network chip versions have
> problems if ASPM is enabled, therefore we have to disable ASPM per
> default. However especially on notebooks ASPM can provide significant
> power-saving, therefore we want to give users the option to enable
> ASPM. With the new sysfs attribute users can control which ASPM
> link-states are disabled.

> +void pcie_aspm_create_sysfs_dev_files(struct pci_dev *pdev);
> +void pcie_aspm_remove_sysfs_dev_files(struct pci_dev *pdev);
>  #else
>  static inline void pcie_aspm_init_link_state(struct pci_dev *pdev) { }
>  static inline void pcie_aspm_exit_link_state(struct pci_dev *pdev) { }
>  static inline void pcie_aspm_pm_state_change(struct pci_dev *pdev) { }
>  static inline void pcie_aspm_powersave_config_link(struct pci_dev *pdev) { }
> -#endif
> -
> -#ifdef CONFIG_PCIEASPM_DEBUG
> -void pcie_aspm_create_sysfs_dev_files(struct pci_dev *pdev);
> -void pcie_aspm_remove_sysfs_dev_files(struct pci_dev *pdev);
> -#else

I like the idea of exposing these sysfs control files all the time,
instead of only when CONFIG_PCIEASPM_DEBUG=y, but I think when we do
that, we should put the files at the downstream end of the link (e.g.,
an endpoint) instead of at the upstream end (e.g., a root port or
switch downstream port).  We had some conversation about this here:

https://lore.kernel.org/lkml/20180727202619.GD173328@bhelgaas-glaptop.roam.corp.google.com

Doing it at the downstream end would require more changes, of course,
and probably raises some locking issues, but I think we have a small
window of opportunity here where we can tweak the sysfs structure
before we're committed to supporting something forever.

Bjorn

  reply	other threads:[~2019-04-30 17:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-13  9:10 [PATCH RFC 0/3] PCI/ASPM: add sysfs attribute for controlling ASPM Heiner Kallweit
2019-04-13  9:11 ` [PATCH RFC 1/3] PCI/ASPM: add L1 sub-state support to pci_disable_link_state Heiner Kallweit
2019-04-13  9:11 ` [PATCH RFC 2/3] PCI/ASPM: allow to re-enable Clock PM Heiner Kallweit
2019-04-13  9:12 ` [PATCH RFC 3/3] PCI/ASPM: add sysfs attribute for controlling ASPM Heiner Kallweit
2019-04-30 17:53   ` Bjorn Helgaas [this message]
2019-05-04 15:18     ` Heiner Kallweit
2019-05-04 15:31     ` Heiner Kallweit
2019-05-06 22:15       ` Bjorn Helgaas
2019-05-04 18:49     ` Heiner Kallweit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190430175304.GC145057@google.com \
    --to=helgaas@kernel.org \
    --cc=fred@fredlawl.com \
    --cc=hkallweit1@gmail.com \
    --cc=linux-pci@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).