mbox series

[RFC,0/6] r8169: disable ASPM during NAPI poll

Message ID af076f1f-a034-82e5-8f76-f3ec32a14eaa@gmail.com (mailing list archive)
Headers show
Series r8169: disable ASPM during NAPI poll | expand

Message

Heiner Kallweit Feb. 25, 2023, 9:43 p.m. UTC
This is a rework of ideas from Kai-Heng on how to avoid the known
ASPM issues whilst still allowing for a maximum of ASPM-related power
savings. As a prerequisite some locking is added first.

This change affects a bigger number of supported chip versions,
therefore this series comes as RFC first for further testing.

Heiner Kallweit (6):
  r8169: use spinlock to protect mac ocp register access
  r8169: use spinlock to protect access to registers Config2 and Config5
  r8169: enable cfg9346 config register access in atomic context
  r8169: prepare rtl_hw_aspm_clkreq_enable for usage in atomic context
  r8169: disable ASPM during NAPI poll
  r8169: remove ASPM restrictions now that ASPM is disabled during NAPI
    poll

 drivers/net/ethernet/realtek/r8169_main.c | 145 +++++++++++++++-------
 1 file changed, 100 insertions(+), 45 deletions(-)

Comments

Kai-Heng Feng March 1, 2023, 6:50 a.m. UTC | #1
On Sun, Feb 26, 2023 at 5:43 AM Heiner Kallweit <hkallweit1@gmail.com> wrote:
>
> This is a rework of ideas from Kai-Heng on how to avoid the known
> ASPM issues whilst still allowing for a maximum of ASPM-related power
> savings. As a prerequisite some locking is added first.
>
> This change affects a bigger number of supported chip versions,
> therefore this series comes as RFC first for further testing.

Thanks for the series.

Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>

>
> Heiner Kallweit (6):
>   r8169: use spinlock to protect mac ocp register access
>   r8169: use spinlock to protect access to registers Config2 and Config5
>   r8169: enable cfg9346 config register access in atomic context
>   r8169: prepare rtl_hw_aspm_clkreq_enable for usage in atomic context
>   r8169: disable ASPM during NAPI poll
>   r8169: remove ASPM restrictions now that ASPM is disabled during NAPI
>     poll
>
>  drivers/net/ethernet/realtek/r8169_main.c | 145 +++++++++++++++-------
>  1 file changed, 100 insertions(+), 45 deletions(-)
>
> --
> 2.39.2
>
Simon Horman March 1, 2023, 10:52 a.m. UTC | #2
On Wed, Mar 01, 2023 at 02:50:43PM +0800, Kai-Heng Feng wrote:
> On Sun, Feb 26, 2023 at 5:43 AM Heiner Kallweit <hkallweit1@gmail.com> wrote:
> >
> > This is a rework of ideas from Kai-Heng on how to avoid the known
> > ASPM issues whilst still allowing for a maximum of ASPM-related power
> > savings. As a prerequisite some locking is added first.
> >
> > This change affects a bigger number of supported chip versions,
> > therefore this series comes as RFC first for further testing.
> 
> Thanks for the series.
> 
> Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>

FWIIW, I also looked over this series and it looks good to me.

Reviewed-by: Simon Horman <simon.horman@corigine.com>
Holger Hoffstätte March 4, 2023, 11:45 a.m. UTC | #3
On 2023-02-25 22:43, Heiner Kallweit wrote:
> This is a rework of ideas from Kai-Heng on how to avoid the known
> ASPM issues whilst still allowing for a maximum of ASPM-related power
> savings. As a prerequisite some locking is added first.
> 
> This change affects a bigger number of supported chip versions,
> therefore this series comes as RFC first for further testing.
> 
> Heiner Kallweit (6):
>    r8169: use spinlock to protect mac ocp register access
>    r8169: use spinlock to protect access to registers Config2 and Config5
>    r8169: enable cfg9346 config register access in atomic context
>    r8169: prepare rtl_hw_aspm_clkreq_enable for usage in atomic context
>    r8169: disable ASPM during NAPI poll
>    r8169: remove ASPM restrictions now that ASPM is disabled during NAPI
>      poll
> 
>   drivers/net/ethernet/realtek/r8169_main.c | 145 +++++++++++++++-------
>   1 file changed, 100 insertions(+), 45 deletions(-)
> 

I've been running this 24/7 for a few days now without any problems, so for
the whole series:

Tested-by: Holger Hoffstätte <holger@applied-asynchrony.com>

Thanks!
Holger