netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neil@brown.name>
To: Florian Fainelli <f.fainelli@gmail.com>,
	David Miller <davem@davemloft.net>
Cc: bjorn@mork.no, gerg@kernel.org, sean.wang@mediatek.com,
	andrew@lunn.ch, vivien.didelot@savoirfairelinux.com,
	netdev@vger.kernel.org, blogic@openwrt.org,
	opensource@vdorst.com
Subject: Re: [PATCH 0/3]: net: dsa: mt7530: support MT7530 in the MT7621 SoC
Date: Mon, 17 Dec 2018 18:11:02 +1100	[thread overview]
Message-ID: <871s6gbpbt.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <C09356D4-28AE-4180-9FFA-897C277FA215@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1871 bytes --]

On Sun, Dec 16 2018, Florian Fainelli wrote:

> On December 16, 2018 3:19:22 PM PST, NeilBrown <neil@brown.name> wrote:
>>On Sun, Dec 16 2018, David Miller wrote:
>>
>>> From: NeilBrown <neil@brown.name>
>>> Date: Mon, 17 Dec 2018 09:08:54 +1100
>>>
>>>> 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.
>>>
>>> That's a huge difference.
>>>
>>> Nothing jumps out as a possible cause except perhaps retpoline or
>>> something like that.
>>
>>I'll keep that in mind - thanks.
>>
>>My guess was CPU-cache invalidation.
>>I just checked and the other CPU core (there are two - each
>>hyper-threaded - "other" meaning not the one that handles ethernet
>>interrupts) gets several thousand "IPI resched" interrupts while
>>running a 10 second (226MByte) iperf3 receive test.
>>About 17KB transferred per IPI.
>>I cannot see where build_skb() would do cache invalidation though.
>
> It doesn't the driver is responsible for that. How is coherency maintained between cores?

I suspect so - yes.  Coherency only needs explicit management with DMA
is used.  This wasn't the problem.

Further investigation showed that the problem was that I had
CONFIG_SLUB_DEBUG set.  That was probably useful in some earlier
debugging exercise, but it clearly isn't useful when performance-testing
the network.
I removed that and I have much nicer numbers - not quite the consistent
900+ that I saw with 4.4, but a lot closer.

Thanks for the encouragement, and sorry of the noise.

NeilBrown


>
> The IPI could be due to receive packet steering, is the MAC multi queue aware on the RX path?
> -- 
> Florian

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2018-12-17  7:11 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-30  7:57 [PATCH 0/3]: net: dsa: mt7530: support MT7530 in the MT7621 SoC gerg
2018-11-30  7:57 ` [PATCH 1/3] net: dsa: mt7530: make clock/regulator setup optional gerg
2018-11-30  7:57 ` [PATCH 2/3] net: dsa: mt7530: optional setting CPU field in MFC register gerg
2018-11-30  7:57 ` [PATCH 3/3] dt-bindings: net: dsa: add new bindings MT7530 gerg
2018-11-30 17:41   ` Florian Fainelli
2018-12-03  7:03     ` Greg Ungerer
2018-12-03 13:19       ` Andrew Lunn
2018-11-30 11:27 ` [PATCH 0/3]: net: dsa: mt7530: support MT7530 in the MT7621 SoC René van Dorst
2018-11-30 13:25   ` Greg Ungerer
2018-11-30 11:30 ` René van Dorst
2018-11-30 12:16 ` Bjørn Mork
2018-11-30 13:41   ` Greg Ungerer
2018-11-30 13:42   ` Andrew Lunn
2018-12-03  7:20   ` Greg Ungerer
2018-12-03 11:34     ` Bjørn Mork
2018-12-03 14:00       ` René van Dorst
2018-12-03 14:02         ` John Crispin
2018-12-07  7:12           ` Greg Ungerer
2018-12-04  7:23       ` Greg Ungerer
2018-12-11  5:02   ` NeilBrown
2018-12-11  8:28     ` Bjørn Mork
2018-12-16 22:08     ` NeilBrown
2018-12-16 22:14       ` David Miller
2018-12-16 23:19         ` NeilBrown
2018-12-17  0:00           ` Florian Fainelli
2018-12-17  7:11             ` NeilBrown [this message]
2018-11-30 13:33 ` Andrew Lunn
2018-12-03  6:47   ` Greg Ungerer
2018-11-30 13:37 ` Andrew Lunn
2018-11-30 13:45   ` Greg Ungerer

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=871s6gbpbt.fsf@notabene.neil.brown.name \
    --to=neil@brown.name \
    --cc=andrew@lunn.ch \
    --cc=bjorn@mork.no \
    --cc=blogic@openwrt.org \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=gerg@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=opensource@vdorst.com \
    --cc=sean.wang@mediatek.com \
    --cc=vivien.didelot@savoirfairelinux.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).