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 09:08:54 +1100 Message-ID: <87a7l5azux.fsf@notabene.neil.brown.name> References: <20181130075737.8041-1-gerg@kernel.org> <87r2f2pxpa.fsf@miraculix.mork.no> <87pnu8vepj.fsf@notabene.neil.brown.name> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Cc: sean.wang@mediatek.com, andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com, netdev@vger.kernel.org, blogic@openwrt.org, =?utf-8?Q?Ren=C3=A9?= van Dorst To: =?utf-8?Q?Bj=C3=B8rn?= Mork , gerg@kernel.org Return-path: Received: from mx2.suse.de ([195.135.220.15]:57080 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730920AbeLPWJI (ORCPT ); Sun, 16 Dec 2018 17:09:08 -0500 In-Reply-To: <87pnu8vepj.fsf@notabene.neil.brown.name> Sender: netdev-owner@vger.kernel.org List-ID: --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG8Yp69OQ2HB7X0l6Oeye3VZigbkFAlwWzPcACgkQOeye3VZi gbmqzA//aK91gYo0Iw/SonFULrdHIglCOLWWNEZcovjQwtm5e12yMy15yZ3QNyXw 6sU4FaLpzPC7UeH8WfyzPpmB3dpYtPeyz++u7hKQj2w4sRvZ3bmUHwHXEgc7Ab21 8ZhyQN63FggYvff35PM2zfZW2fXowRPhlc9zHoNl03I/x53pxqwmMpkOsdOOSyEQ 3VTplTAmhEerG/sUiK9/fNWgfWaJyT5hQhIEK51UsnYZBXb6j5YFlJ4YlTYAfMRw MldkM7DvBgtvDyWJBIzaKvURbOXVwMnH9hZTOgr1TFhgMpMawsACAwD3lbcocF5m mKOO7HozTDs7cMUN2kw6JuP2Zu/OV0qXPCMEf+KqmVrNcbG97560rhouCY1ELdQz t5bxIjNz6/a4NCQJAArOr0Mq1lDQ69+fGmp0FkgSaOdx7JBzG1WUeZCJ2q87+x1n 6rq9wTvexx13JsD7Yoq0iZXjh9ibQYAshQaIQKkkBtSS0WpgpF3xq4J7qZdD3asz Fd+TGiluPWhf66Uv6DRJely8NSUdZF5TO+LvckSbb55i505GPs3+T4auLUFKxIT0 GwXm+dH9cbAjNYsc2q7LnIfWJd4heiWy0gvP/KELxlRNy8DcxW17ePRqSzjbDfrx 2nhOZCoDHKFl3393W4/HDArzVKT0qIHoWI5Ri4GnF5hIHKCBZqg= =ANDX -----END PGP SIGNATURE----- --=-=-=--