From mboxrd@z Thu Jan 1 00:00:00 1970 From: NeilBrown Subject: Re: [PATCH 0/3]: net: dsa: mt7530: support MT7530 in the MT7621 SoC Date: Mon, 17 Dec 2018 10:19:22 +1100 Message-ID: <875zvtawlh.fsf@notabene.neil.brown.name> References: <87r2f2pxpa.fsf@miraculix.mork.no> <87pnu8vepj.fsf@notabene.neil.brown.name> <87a7l5azux.fsf@notabene.neil.brown.name> <20181216.141458.260639209068679776.davem@davemloft.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Cc: bjorn@mork.no, gerg@kernel.org, sean.wang@mediatek.com, andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com, netdev@vger.kernel.org, blogic@openwrt.org, opensource@vdorst.com To: David Miller Return-path: Received: from mx2.suse.de ([195.135.220.15]:36222 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730911AbeLPXTf (ORCPT ); Sun, 16 Dec 2018 18:19:35 -0500 In-Reply-To: <20181216.141458.260639209068679776.davem@davemloft.net> Sender: netdev-owner@vger.kernel.org List-ID: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sun, Dec 16 2018, David Miller wrote: > From: NeilBrown > 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. >>=20 >> 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. Thanks, NeilBrown --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG8Yp69OQ2HB7X0l6Oeye3VZigbkFAlwW3XoACgkQOeye3VZi gblxwxAAonhGkiJVMnOBJo0fnK9dl8Kvn2qn9SPsqI1Jscp7CinZgUyhx9Vy9zXV RPgWHKN+6ymeWT8UvOVslUEmIizp/HSJ9c7l4pXVmywOZTVA+MC7oACwdcxg9hsm pKUkLQZM9eAezMxXeH9U58dGgpeyl1NlMR5be3yypbcnfU5KVSWrvVlUSDGtDNwp pGmmZisdeQX1NTjYO6Xid42qqvrK/NkRD+qDCqQ+RRUQurLJJx1+c6mUlFHY4xv2 LXee3805uyHCo7IhOJUDaaqaFxFbyzyDTBSN1yeY/yCufcTVDv0BuH279RRNbMFx auzPh/RnSB8LDwMNCAj3/zgnI+kK8rZlK73mFfm2Zw/Rv/rgTlx+tpHA8fK2layz J8F6mtb7+ZZ4r1xjwem1TiY9N8iTb2oYeceV7d8dZvspqQ/tSEbtbdLKty9thfFV itJBWycMBUdR30bJoTzKnyfovVJb6h2c9XmXAShgU3pCBhC4baby2iTSQIhldr+i S9nBAtIz4l14PPzTomFPme0UOLhbN4ZB+88PnyYGP/GpxPtoWjAoKH0X89M6zhcb DXLstvvld+eUeq0lo7fkwC7nIZdLrLxe4tYSlm5e1UGkB9r+33A/DW6gBTPQWLZG WjIy7+zlQ3Pkpd3sV87QdzOIAIXpFjUKB3yk3llq0UDL5UxqLYc= =qGxe -----END PGP SIGNATURE----- --=-=-=--