public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Klaus Kudielka <klaus.kudielka@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Richard Cochran <richardcochran@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Klaus Kudielka <klaus.kudielka@gmail.com>
Subject: [PATCH net-next v3 0/4] net: dsa: mv88e6xxx: accelerate C45 scan
Date: Tue, 14 Mar 2023 19:26:55 +0100	[thread overview]
Message-ID: <20230314182659.63686-1-klaus.kudielka@gmail.com> (raw)

Starting with commit 1a136ca2e089 ("net: mdio: scan bus based on bus
capabilities for C22 and C45"), mdiobus_scan_bus_c45() is being called on
buses with MDIOBUS_NO_CAP. On a Turris Omnia (Armada 385, 88E6176 switch),
this causes a significant increase of boot time, from 1.6 seconds, to 6.3
seconds. The boot time stated here is until start of /init.

Further testing revealed that the C45 scan is indeed expensive (around
2.7 seconds, due to a huge number of bus transactions), and called twice.

Two things were suggested:
(1) to move the expensive call of mv88e6xxx_mdios_register() from
    mv88e6xxx_probe() to mv88e6xxx_setup().
(2) to mask apparently non-existing phys during probing.

Before that:
Patch #1 prepares the driver to handle the movement of
mv88e6xxx_mdios_register() to mv88e6xxx_setup() for cross-chip DSA trees.
Patch #2 is preparatory code movement, without functional change.

With those changes, boot time on the Turris Omnia is back to normal.

Link: https://lore.kernel.org/lkml/449bde236c08d5ab5e54abd73b645d8b29955894.camel@gmail.com/

Changes in v2:
Add cover letter
Extend the cleanup in mv88e6xxx_setup() to remove the mdio bus on failure 
Add patch "mask apparently non-existing phys during probing"

Changes in v3:
Add patch "don't dispose of Global2 IRQ mappings from mdiobus code"

Klaus Kudielka (3):
  net: dsa: mv88e6xxx: re-order functions
  net: dsa: mv88e6xxx: move call to mv88e6xxx_mdios_register()
  net: dsa: mv88e6xxx: mask apparently non-existing phys during probing

Vladimir Oltean (1):
  net: dsa: mv88e6xxx: don't dispose of Global2 IRQ mappings from
    mdiobus code

 drivers/net/dsa/mv88e6xxx/chip.c    | 381 ++++++++++++++--------------
 drivers/net/dsa/mv88e6xxx/global2.c |  20 +-
 2 files changed, 196 insertions(+), 205 deletions(-)

-- 
2.39.2


             reply	other threads:[~2023-03-14 18:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-14 18:26 Klaus Kudielka [this message]
2023-03-14 18:26 ` [PATCH] net: dsa: mv88e6xxx: don't dispose of Global2 IRQ mappings from mdiobus code Klaus Kudielka
2023-03-14 19:35   ` Klaus Kudielka
2023-03-14 20:01     ` Vladimir Oltean
2023-03-15  6:07       ` Klaus Kudielka
2023-03-15  9:53         ` Vladimir Oltean
2023-03-15 14:41         ` Andrew Lunn
2023-03-14 18:26 ` [PATCH net-next v3 2/4] net: dsa: mv88e6xxx: re-order functions Klaus Kudielka
2023-03-14 18:26 ` [PATCH net-next v3 3/4] net: dsa: mv88e6xxx: move call to mv88e6xxx_mdios_register() Klaus Kudielka
2023-03-14 19:15   ` Andrew Lunn
2023-03-14 18:26 ` [PATCH net-next v3 4/4] net: dsa: mv88e6xxx: mask apparently non-existing phys during probing Klaus Kudielka
2023-03-14 19:23   ` Andrew Lunn

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=20230314182659.63686-1-klaus.kudielka@gmail.com \
    --to=klaus.kudielka@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    /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