netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Lukas Wunner <lukas@wunner.de>
Cc: netdev@vger.kernel.org, "David S . Miller" <davem@davemloft.net>,
	Petr Stetiar <ynezz@true.cz>, YueHaibing <yuehaibing@huawei.com>
Subject: Re: [PATCH V4 00/19] net: ks8851: Unify KS8851 SPI and MLL drivers
Date: Wed, 15 Apr 2020 16:51:39 +0200	[thread overview]
Message-ID: <ac0f7227-a4ae-b6cd-36ec-3bcb02b1adbe@denx.de> (raw)
In-Reply-To: <20200415143909.wmtmud3vkkwzjv73@wunner.de>

On 4/15/20 4:39 PM, Lukas Wunner wrote:
> On Tue, Apr 14, 2020 at 08:20:10PM +0200, Marek Vasut wrote:
>> NOTE: The V4 is now tested on RPi3B with KSZ8851SNL DEMO Board at 25 MHz.
>>       The "ping -c 1000 -i 0.01" latency test is fluctuating around
>>       		rtt min/avg/max/mdev = 1.448/1.540/1.699/0.030 ms
>>       either way, with or without this series.
> 
> Compiling this series fails if CONFIG_KS8851=m and CONFIG_KS8851_MLL=y:
> 
> arm-linux-gnueabihf-ld: drivers/net/ethernet/micrel/ks8851_common.o:(__param+0x4): undefined reference to `__this_module'
> 
> I already reported this in my e-mail of April 6th, it's caused by the
> module_param_named() for msg_enable.
> 
> 
> Reading the MAC address from an external EEPROM works with this series.
> 
> 
> I still get worse performance with this series than without it
> (perhaps unsurprisingly so because not much has changed from v3 to v4).

I reinstated the indirect access, so things did change. Besides, there
performance for the parallel option is back where it was with the old
driver, which is important for me.

> We're using CONFIG_PREEMPT_RT_FULL=y.  I'm sorry for not mentioning this
> earlier, I didn't assume it would make such a big difference but
> apparently it does.

Do you also have the RT patch applied ?

> This is the branch I've tested today:
> https://github.com/l1k/linux/commits/revpi-4.19-marek-v4

You seem to have quite a few more patches in that repository than just
this series, some of them even touching the RPi SPI driver and it's DMA
implementation.

Could it be that's why I don't see your performance problems too ?

> Latency without this series (ping -A -c 100000):
> rtt min/avg/max/mdev = 0.793/1.694/2.321/0.044 ms, ipg/ewma 2.000/1.691 ms
> 
> Latency with this series:
> rtt min/avg/max/mdev = 0.957/1.715/2.652/0.043 ms, ipg/ewma 2.000/1.716 ms
> 
> 
> RX throughput without this series (iperf3 -f k -i 0 -c):
> [  5]   0.00-10.00  sec  19.0 MBytes  15960 Kbits/sec                  receiver
> 
> RX throughput with this series:
> [  5]   0.00-10.00  sec  18.5 MBytes  15498 Kbits/sec                  receiver
> 
> 
> TX throughput without this series (iperf3 -R -f k -i 0 -c):
> [  5]   0.00-10.00  sec  18.6 MBytes  15614 Kbits/sec                  receiver
> 
> TX throughput with this series:
> [  5]   0.00-10.00  sec  18.3 MBytes  15371 Kbits/sec                  receiver
> 
> So this is pretty much the same performance degredation as before.
> 
> 
>>> I'm wondering where the
>>> performance penalty is originating from:  Perhaps because of the
>>> 16-bit read of RXFC in ks8851_rx_pkts()?
>>
>> Can you patch that part away to see whether that's the case ?
> 
> Will do.

Thanks

>>> Check if the driver for the SPI controller is buggy or somehow limits the
>>> speed.
>>
>> I used two different drivers -- the iMX SPI and the STM32 SPI -- I would
>> say that if both show the same behavior, it's unlikely to be the driver.
> 
> Hm, so why did it work with the RasPi but not with the others?

I didn't have a chance to debug this yet.

  reply	other threads:[~2020-04-15 14:57 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-28  0:31 [PATCH V3 00/18] net: ks8851: Unify KS8851 SPI and MLL drivers Marek Vasut
2020-03-28  0:31 ` [PATCH V3 01/18] net: ks8851: Factor out spi->dev in probe()/remove() Marek Vasut
2020-03-28  0:31 ` [PATCH V3 02/18] net: ks8851: Rename ndev to netdev in probe Marek Vasut
2020-03-28  0:31 ` [PATCH V3 03/18] net: ks8851: Replace dev_err() with netdev_err() in IRQ handler Marek Vasut
2020-03-28  0:31 ` [PATCH V3 04/18] net: ks8851: Pass device node into ks8851_init_mac() Marek Vasut
2020-03-28  0:31 ` [PATCH V3 05/18] net: ks8851: Use devm_alloc_etherdev() Marek Vasut
2020-03-28  0:31 ` [PATCH V3 06/18] net: ks8851: Use dev_{get,set}_drvdata() Marek Vasut
2020-03-28  0:31 ` [PATCH V3 07/18] net: ks8851: Remove ks8851_rdreg32() Marek Vasut
2020-03-28  0:31 ` [PATCH V3 08/18] net: ks8851: Use 16-bit writes to program MAC address Marek Vasut
2020-03-28  0:31 ` [PATCH V3 09/18] net: ks8851: Use 16-bit read of RXFC register Marek Vasut
2020-03-28  0:31 ` [PATCH V3 10/18] net: ks8851: Factor out bus lock handling Marek Vasut
2020-03-28  0:31 ` [PATCH V3 11/18] net: ks8851: Factor out SKB receive function Marek Vasut
2020-03-28  0:31 ` [PATCH V3 12/18] net: ks8851: Split out SPI specific entries in struct ks8851_net Marek Vasut
2020-03-28  0:31 ` [PATCH V3 13/18] net: ks8851: Split out SPI specific code from probe() and remove() Marek Vasut
2020-03-28  0:31 ` [PATCH V3 14/18] net: ks8851: Factor out TX work flush function Marek Vasut
2020-03-28  0:31 ` [PATCH V3 15/18] net: ks8851: Permit overridding interrupt enable register Marek Vasut
2020-03-28  0:31 ` [PATCH V3 16/18] net: ks8851: Separate SPI operations into separate file Marek Vasut
2020-03-28  2:45   ` kbuild test robot
2020-03-28  4:11   ` kbuild test robot
2020-03-28  0:31 ` [PATCH V3 17/18] net: ks8851: Implement Parallel bus operations Marek Vasut
2020-03-28  0:31 ` [PATCH V3 18/18] net: ks8851: Remove ks8851_mll.c Marek Vasut
2020-03-29 16:15 ` [PATCH V3 00/18] net: ks8851: Unify KS8851 SPI and MLL drivers Marek Vasut
2020-04-06  3:16 ` Lukas Wunner
2020-04-06 11:20   ` Marek Vasut
2020-04-08 19:49     ` Marek Vasut
2020-04-10 11:01       ` Lukas Wunner
2020-04-10 18:10         ` Marek Vasut
2020-04-14 18:20           ` [PATCH V4 00/19] " Marek Vasut
2020-04-14 18:20             ` [PATCH V4 01/19] net: ks8851: Factor out spi->dev in probe()/remove() Marek Vasut
2020-04-14 18:20             ` [PATCH V4 02/19] net: ks8851: Rename ndev to netdev in probe Marek Vasut
2020-04-14 18:20             ` [PATCH V4 03/19] net: ks8851: Replace dev_err() with netdev_err() in IRQ handler Marek Vasut
2020-04-14 18:20             ` [PATCH V4 04/19] net: ks8851: Pass device node into ks8851_init_mac() Marek Vasut
2020-04-14 18:20             ` [PATCH V4 05/19] net: ks8851: Use devm_alloc_etherdev() Marek Vasut
2020-04-14 18:20             ` [PATCH V4 06/19] net: ks8851: Use dev_{get,set}_drvdata() Marek Vasut
2020-04-14 18:20             ` [PATCH V4 07/19] net: ks8851: Remove ks8851_rdreg32() Marek Vasut
2020-04-20 14:07               ` Lukas Wunner
2020-04-20 14:12                 ` Marek Vasut
2020-04-20 14:20                   ` Lukas Wunner
2020-04-20 14:24                     ` Marek Vasut
2020-04-20 14:44                       ` Lukas Wunner
2020-04-20 15:38                         ` Marek Vasut
2020-04-20 15:50                           ` Andrew Lunn
2020-05-07 14:22                             ` Marek Vasut
2020-04-14 18:20             ` [PATCH V4 08/19] net: ks8851: Use 16-bit writes to program MAC address Marek Vasut
2020-04-14 18:20             ` [PATCH V4 09/19] net: ks8851: Use 16-bit read of RXFC register Marek Vasut
2020-04-14 18:20             ` [PATCH V4 10/19] net: ks8851: Factor out bus lock handling Marek Vasut
2020-04-14 18:20             ` [PATCH V4 11/19] net: ks8851: Factor out SKB receive function Marek Vasut
2020-04-14 18:20             ` [PATCH V4 12/19] net: ks8851: Split out SPI specific entries in struct ks8851_net Marek Vasut
2020-04-14 18:20             ` [PATCH V4 13/19] net: ks8851: Split out SPI specific code from probe() and remove() Marek Vasut
2020-04-14 18:20             ` [PATCH V4 14/19] net: ks8851: Factor out TX work flush function Marek Vasut
2020-04-14 18:20             ` [PATCH V4 15/19] net: ks8851: Permit overridding interrupt enable register Marek Vasut
2020-04-14 18:20             ` [PATCH V4 16/19] net: ks8851: Implement register, FIFO, lock accessor callbacks Marek Vasut
2020-04-14 18:20             ` [PATCH V4 17/19] net: ks8851: Separate SPI operations into separate file Marek Vasut
2020-04-15 14:56               ` Lukas Wunner
2020-04-16  9:58                 ` Marek Vasut
2020-04-14 18:20             ` [PATCH V4 18/19] net: ks8851: Implement Parallel bus operations Marek Vasut
2020-04-14 18:20             ` [PATCH V4 19/19] net: ks8851: Remove ks8851_mll.c Marek Vasut
2020-04-14 20:13             ` [PATCH V4 00/19] net: ks8851: Unify KS8851 SPI and MLL drivers David Miller
2020-04-15 14:39             ` Lukas Wunner
2020-04-15 14:51               ` Marek Vasut [this message]
2020-04-15 15:12                 ` Lukas Wunner
2020-04-16 10:18                   ` Marek Vasut

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=ac0f7227-a4ae-b6cd-36ec-3bcb02b1adbe@denx.de \
    --to=marex@denx.de \
    --cc=davem@davemloft.net \
    --cc=lukas@wunner.de \
    --cc=netdev@vger.kernel.org \
    --cc=ynezz@true.cz \
    --cc=yuehaibing@huawei.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;
as well as URLs for NNTP newsgroup(s).