[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c3bc08f82f1c435ca6fd47e30eb65405@AcuMS.aculab.com>
Date: Fri, 28 Jan 2022 14:10:09 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Tobias Waldekranz' <tobias@...dekranz.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"kuba@...nel.org" <kuba@...nel.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH v2 net-next 0/2] net: dsa: mv88e6xxx: Improve indirect
addressing performance
From: Tobias Waldekranz
> Sent: 28 January 2022 10:50
>
> 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.
I don't think you should fast-poll for the entire timeout period.
Much better to drop to a usleep_range() after the first 2 (or 3)
reads fail.
Also I presume there is some lock that ensures this is all single threaded?
If you remember the 'busy state' you can defer the 'busy check' after
a write until the next request.
That may well reduce the number of 'double checks' needed.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists