[PATCH net] net: stmmac: dwmac-imx: request high frequency mode

Andrew Lunn andrew at lunn.ch
Wed Oct 4 20:09:30 PDT 2023


On Wed, Oct 04, 2023 at 02:54:42PM -0500, Shenwei Wang wrote:
> Some i.MX SoCs like the i.mx8mq support adjusting the frequency of the
> DDR, AHB, and AXI buses based on system loading. If the dwmac interface
> in the driver does not request a HIGH frequency, it can significantly
> degrade performance when the system switches to a lower frequency to
> conserve power.
> 
> For example, on an i.MX8MQ EVK board, the throughput dropped to around
> 100Mbit/s on a 1Gbit connection:
> 
>     [ ID] Interval           Transfer     Bitrate
>     [  5]   0.00-10.00  sec   117 MBytes  97.9 Mbits/sec
> 
> However, throughput can return to expected levels after its driver requests
> the high frequency mode. Requesting high frequency in the dwmac driver is
> essential to maintain full throughput when the i.MX SoC adjusts bus speeds
> for power savings.

Isn't this going to cause a power regression? I expect there are
applications which expect this behaviour and are happy with
100Mbps. And you are going to change it so their battery goes flatter
faster, or they need to run their fan more often. So maybe you need a
DT property to always forcing high speed.

And as Florian pointed out, maybe you should look at the negotiated
speed, and if you have a 10 or 100Mbps link, the MAC does not need
high frequency, so why not allow it to be low and safe some power.

     Andrew



More information about the linux-arm-kernel mailing list