Re: [PATCH 3/5] PCI: mediatek-gen3: Disable ASPM L0s

Bjorn Helgaas
2025-01-07T23:06:25Z

On Tue, Jan 07, 2025 at 02:44:37AM +0000, Jianjun Wang (王建军) wrote:
> On Fri, 2025-01-03 at 13:15 -0600, Bjorn Helgaas wrote:
> > On Fri, Jan 03, 2025 at 02:00:13PM +0800, Jianjun Wang wrote:
> > > Disable ASPM L0s support because it does not significantly save
> > > power but impacts performance.
> >
> > This seems like a user/administrator decision, not a driver
> > decision.
> >
> > L0s reduces power at the cost of performance for *all* PCIe
> > devices, although the actual numbers may vary.
>
> We have encountered some compatibility issues when connected with
> some PCIe EPs, these issues are probabilistic and disabling the L0s
> can fix them.

This sounds like either a software problem in ASPM or a hardware
problem in one of the devices. If it's a Linux ASPM issue, obviously
we should find and fix that. If it's an endpoint hardware issue, we
should fix the driver or quirk it to avoid L0s on all platforms, not
just this one.

If it's a mediatek-gen3 hardware issue, we should disable L0s as you
do here. But if the reason is to work around a hardware erratum, we
should describe it as such.

Justifying it as "L0s really doesn't save much power, so disable it"
is an invitation for somebody to come back and ask why L0s doesn't
work when the lspci output claims it *should* work.

> Users may not be aware of these issues, so I think disabling L0s
> through the driver might be the better way, since it does not
> significantly save power and we usually use L1ss for power-saving
> when the link is idle.

Users should not need to be aware of probabilistic behavior problems
related to ASPM. It's *our* problem to make sure users never see
issues like that :)

Bjorn