On Tue, Dec 11 2018, NeilBrown wrote:

>
> I got your patch working on 4.20-rc5 and did a performance comparison.
> With the staging driver (using iperf3) I get
>   220 MBit/sec in
>   680 MBit/sec out
>
> with the patched mainline driver I get
>   190 MBit/sec in
>    93 MBit/sec out
>
> (numbers are a bit rubbery, but within 10%)
>
> I haven't looked into why this might be, but thought I would mention it.
>
> Strangely when I test with scp, I get about 10MB/sec in both directions
> with both drivers.  Maybe the CPU limits encryption speed.
>
> I have a 4.4-based kernel where I get 940MBit/sec both ways - using a
> precursor of the current staging driver.

Just FYI, I've been looking further into this, and I don't think the
problem is (entirely) related to the driver.

In my 4.4 kernel, the build_skb() call in (the equivalent of)
mtk_poll_rx() takes about 1.2usec and the call to napi_gro_receive()
takes about 3usec.

In my 4.20 kernel, these calls take about 30 and 24 usec respectively.
This easily explains the slowdown.
I don't yet know why, and won't have time to look for a few days.
I haven't looked into how this affects the
drivers/net/ethernet/mediatek driver in 4.20.

If anyone has ideas about why these might be so slow, I'd love to hear
them.

Thanks,
NeilBrown

Attachment: signature.asc
Description: PGP signature

Reply via email to