All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tobias Waldekranz <tobias@waldekranz.com>
To: davem@davemloft.net, kuba@kernel.org
Cc: netdev@vger.kernel.org, andrew@lunn.ch, David.Laight@ACULAB.COM
Subject: [PATCH v3 net-next 0/2] net: dsa: mv88e6xxx: Improve indirect addressing performance
Date: Fri, 28 Jan 2022 17:26:48 +0100	[thread overview]
Message-ID: <20220128162650.2510062-1-tobias@waldekranz.com> (raw)

The individual patches have all the details. This work was triggered
by recent work on a platform that took 16s (sic) to load the mv88e6xxx
module.

The first patch gets rid of most of that time by replacing a very long
delay with a tighter poll loop to wait for the busy bit to clear.

The second patch shaves off some more time by avoiding redundant
busy-bit-checks, saving 1 out of 4 MDIO operations for every register
read/write in the optimal case.

v1 -> v2:
- Make sure that we always poll the busy bit at least twice, in the
  unlikely event that the first one is quick to query the hardware,
  but is then scheduled out for a long time before the timeout is
  checked.

v2 -> v3:
- Fallback to the longer sleeps after the initial two poll attempts.

Tobias Waldekranz (2):
  net: dsa: mv88e6xxx: Improve performance of busy bit polling
  net: dsa: mv88e6xxx: Improve indirect addressing performance

 drivers/net/dsa/mv88e6xxx/chip.c | 13 +++++++++---
 drivers/net/dsa/mv88e6xxx/chip.h |  1 +
 drivers/net/dsa/mv88e6xxx/smi.c  | 35 +++++++++++++++++++++-----------
 3 files changed, 34 insertions(+), 15 deletions(-)

-- 
2.25.1


             reply	other threads:[~2022-01-28 16:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28 16:26 Tobias Waldekranz [this message]
2022-01-28 16:26 ` [PATCH v3 net-next 1/2] net: dsa: mv88e6xxx: Improve performance of busy bit polling Tobias Waldekranz
2022-01-28 17:17   ` Andrew Lunn
2022-01-28 16:26 ` [PATCH v3 net-next 2/2] net: dsa: mv88e6xxx: Improve indirect addressing performance Tobias Waldekranz
2022-01-31 11:40 ` [PATCH v3 net-next 0/2] " patchwork-bot+netdevbpf

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=20220128162650.2510062-1-tobias@waldekranz.com \
    --to=tobias@waldekranz.com \
    --cc=David.Laight@ACULAB.COM \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.