mbox series

[v2,net-next,0/3] net: mvmdio: Performance related improvements

Message ID 20231204100811.2708884-1-tobias@waldekranz.com (mailing list archive)
Headers show
Series net: mvmdio: Performance related improvements | expand

Message

Tobias Waldekranz Dec. 4, 2023, 10:08 a.m. UTC
Observations of the XMDIO bus on a CN9130-based system during a
firmware download showed a very low bus utilization, which stemmed
from the 150us (10x the average access time) sleep which would take
place when the first poll did not succeed.

With this series in place, bus throughput increases by about 10x,
multiplied by whatever gain you are able to extract from running the
MDC at a higher frequency (hardware dependent).

I would really appreciate it if someone with access to hardware using
the IRQ driven path could test that out, since I have not been able to
figure out how to set this up on CN9130.

v1 -> v2:
- Remove dead code
- Simplify IRQ path, now that the polled path is separate.

Tobias Waldekranz (3):
  arm64: dts: marvell: cp11x: Provide clock names for MDIO controllers
  net: mvmdio: Avoid excessive sleeps in polled mode
  net: mvmdio: Support setting the MDC frequency on XSMI controllers

 arch/arm64/boot/dts/marvell/armada-cp11x.dtsi |  4 +
 drivers/net/ethernet/marvell/mvmdio.c         | 97 ++++++++++++-------
 2 files changed, 64 insertions(+), 37 deletions(-)

Comments

Andrew Lunn Dec. 5, 2023, 3:47 a.m. UTC | #1
On Mon, Dec 04, 2023 at 11:08:08AM +0100, Tobias Waldekranz wrote:
> Observations of the XMDIO bus on a CN9130-based system during a
> firmware download showed a very low bus utilization, which stemmed
> from the 150us (10x the average access time) sleep which would take
> place when the first poll did not succeed.
> 
> With this series in place, bus throughput increases by about 10x,
> multiplied by whatever gain you are able to extract from running the
> MDC at a higher frequency (hardware dependent).
> 
> I would really appreciate it if someone with access to hardware using
> the IRQ driven path could test that out, since I have not been able to
> figure out how to set this up on CN9130.

Hi Tobias

I tested on Kirkwood:

               mdio: mdio-bus@72004 {
                        compatible = "marvell,orion-mdio";
                        #address-cells = <1>;
                        #size-cells = <0>;
                        reg = <0x72004 0x84>;
                        interrupts = <46>;

The link is reported as up, ethtool shows the expected link mode
capabilities, mii-tool dumps look O.K.

Tested-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Tobias Waldekranz Dec. 5, 2023, 7:31 a.m. UTC | #2
On tis, dec 05, 2023 at 04:47, Andrew Lunn <andrew@lunn.ch> wrote:
> On Mon, Dec 04, 2023 at 11:08:08AM +0100, Tobias Waldekranz wrote:
>> Observations of the XMDIO bus on a CN9130-based system during a
>> firmware download showed a very low bus utilization, which stemmed
>> from the 150us (10x the average access time) sleep which would take
>> place when the first poll did not succeed.
>> 
>> With this series in place, bus throughput increases by about 10x,
>> multiplied by whatever gain you are able to extract from running the
>> MDC at a higher frequency (hardware dependent).
>> 
>> I would really appreciate it if someone with access to hardware using
>> the IRQ driven path could test that out, since I have not been able to
>> figure out how to set this up on CN9130.
>
> Hi Tobias
>
> I tested on Kirkwood:
>
>                mdio: mdio-bus@72004 {
>                         compatible = "marvell,orion-mdio";
>                         #address-cells = <1>;
>                         #size-cells = <0>;
>                         reg = <0x72004 0x84>;
>                         interrupts = <46>;
>
> The link is reported as up, ethtool shows the expected link mode
> capabilities, mii-tool dumps look O.K.
>
> Tested-by: Andrew Lunn <andrew@lunn.ch>

Very much appreciated Andrew, thank you!
patchwork-bot+netdevbpf@kernel.org Dec. 6, 2023, 4:20 a.m. UTC | #3
Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon,  4 Dec 2023 11:08:08 +0100 you wrote:
> Observations of the XMDIO bus on a CN9130-based system during a
> firmware download showed a very low bus utilization, which stemmed
> from the 150us (10x the average access time) sleep which would take
> place when the first poll did not succeed.
> 
> With this series in place, bus throughput increases by about 10x,
> multiplied by whatever gain you are able to extract from running the
> MDC at a higher frequency (hardware dependent).
> 
> [...]

Here is the summary with links:
  - [v2,net-next,1/3] arm64: dts: marvell: cp11x: Provide clock names for MDIO controllers
    (no matching commit)
  - [v2,net-next,2/3] net: mvmdio: Avoid excessive sleeps in polled mode
    https://git.kernel.org/netdev/net-next/c/7dd12fe34686
  - [v2,net-next,3/3] net: mvmdio: Support setting the MDC frequency on XSMI controllers
    https://git.kernel.org/netdev/net-next/c/eb6a6605ff5a

You are awesome, thank you!