From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DDF34C43381 for ; Thu, 14 Feb 2019 06:18:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9C4A6222A1 for ; Thu, 14 Feb 2019 06:18:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SFgXPack" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405691AbfBNGSA (ORCPT ); Thu, 14 Feb 2019 01:18:00 -0500 Received: from mail-wm1-f46.google.com ([209.85.128.46]:36251 "EHLO mail-wm1-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405115AbfBNGSA (ORCPT ); Thu, 14 Feb 2019 01:18:00 -0500 Received: by mail-wm1-f46.google.com with SMTP id j125so4842565wmj.1 for ; Wed, 13 Feb 2019 22:17:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=/vvKccpyAgdX4bwGmcrVJb90bSoyCytuU9YWqGs8Vt4=; b=SFgXPackLcXb+R54LcoTvJyKMEbDehaYfO29fiTP8GHbmEGz7qI7h+Fp8/mWdxaw0N F8GGvK8I/IZ/8VCjz3llWpdbF0lb5mxgG8M2nwNQJIGpKryhaD8E8TJ+BSZ9LHCPj+RL Lc6ykVqsot6KGcQ+oJfZhIZ3qttjcc9WVALDhNHrsrU040EamTXNm4bbarVnWhO5R7Y0 3J0gn/4pE+zPA7JJ12Etth8uVp5CT6iXfPW1mk2RLFiAC43AEx6qnNPrKQ9II76KIq7B cGaDm+I38mTFYeZoFbmDtXNj0ubP1TEL2QVmw9jUZ1IAnXa15ILeKoFtF9SAIJS+ig7q Tp9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/vvKccpyAgdX4bwGmcrVJb90bSoyCytuU9YWqGs8Vt4=; b=ijefXZGxJmJ09zVGEZJ9AgZvbuGsZKO+Jq/3Jm+PImLPBiLJkpHle+nbh+j8/2YwXM YG58QXTWzKm7D6ohARSNsrnmni2IeH8Y8MDyQFTO1idA8QAIIgSdxgdER58VoF90C0wR jA7gJgsbfyW+ZIlvkPFL26wqgtFb+mNb3iNIwx1Qf2mBpZyGR+K0QVWOtn2OSAN99FR4 jxH61gSPPjoAwT7UMPkKSt5KOMvHkEpRNk1QGXYY9vhT2v5KtzmHaObDhjy5juHVnJ6a 3GkqU6Y6JbER1qFmGpTQGFm/YncffDq0lO0a87g3GT1C8dtiUpz2JnM7L2F506MQN3uK kQwg== X-Gm-Message-State: AHQUAuZqbvxy/Kl/+6QxT0xgbs15xDMESFB7dYYU0C9EYyMAN6dAsdw7 5KKXIQi6XfGtnl3XfVT3C3w= X-Google-Smtp-Source: AHgI3Iatdfq+zRFhL3mgJNqItXIxj8fp49cqEB0ykYG9+JfNRvqbCknkSUve6OqE4+gCCLLGyTRhhw== X-Received: by 2002:a1c:7016:: with SMTP id l22mr1364656wmc.70.1550125077257; Wed, 13 Feb 2019 22:17:57 -0800 (PST) Received: from ?IPv6:2003:ea:8bf1:e200:9d1a:be6e:7b7e:ba90? (p200300EA8BF1E2009D1ABE6E7B7EBA90.dip0.t-ipconnect.de. [2003:ea:8bf1:e200:9d1a:be6e:7b7e:ba90]) by smtp.googlemail.com with ESMTPSA id w16sm778239wrp.1.2019.02.13.22.17.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Feb 2019 22:17:56 -0800 (PST) Subject: Re: r8169 Driver - Poor Network Performance Since Kernel 4.19 To: David Chang Cc: Realtek linux nic maintainers , netdev@vger.kernel.org, Martti Laaksonen References: <172787aa-9ef5-091d-f70f-baf89fe0b1ee@gmail.com> <20190131023240.GF25745@linux-kyyb.suse> <856b3a75-5daf-6ce8-7fa3-0405e3cefe97@gmail.com> <20190214024527.GG7193@linux-kyyb.suse> From: Heiner Kallweit Message-ID: <47a0819f-5ec3-6d73-210e-235d6bbcaab1@gmail.com> Date: Thu, 14 Feb 2019 07:17:44 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <20190214024527.GG7193@linux-kyyb.suse> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi David, On 14.02.2019 03:45, David Chang wrote: > Hi Heiner, > > On Feb 05, 2019 at 19:50:30 +0100, Heiner Kallweit wrote: >> Hi David, >> >> meanwhile there's the following bug report matching what reported. >> It's even the same chip version (RTL8168h). >> https://bugzilla.redhat.com/show_bug.cgi?id=1671958 >> >> Symptom there is also a significant number of rx_missed packets. >> Could you try what I mentioned there last: >> Try building a kernel with the call to rtl_hw_aspm_clkreq_enable(tp, true) at the >> end of rtl_hw_start_8168h_1() being disabled. > > After disabled the aspm function that you mentioned, we finally got the > positive testing result. And the rx_missed error was gone. If without > the patch, the receive side get back to bad performance. > Good to know, thanks. I also checked with Realtek, they confirmed that their Windows driver uses some heuristics to disable ASPM under high load. So it seems like there is some hw issue. Open so far is whether this affects certain chip versions only. Let's see whether they can provide more information. Disabling ASPM in general would hurt notebook users because based on some past measurements we know ASPM can significantly save energy. > kernel: r8169: loading out-of-tree module taints kernel. > kernel: r8169: module verification failed: signature and/or required key missing - tainting kernel > kernel: libphy: r8169: probed > kernel: r8169 0000:01:00.0 eth0: RTL8168h/8111h, ec:8e:b5:5a:2c:f5, XID 54100880, IRQ 128 > kernel: r8169 0000:01:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko] > kernel: r8169 0000:01:00.0 enp1s0: renamed from eth0 > kernel: Generic PHY r8169-100:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=r8169-100:00, irq=IGNORE) > kernel: r8169 0000:01:00.0 enp1s0: Link is Up - 1Gbps/Full - flow control off > > NIC statistics: > tx_packets: 1653804 > rx_packets: 1555966 > tx_errors: 0 > rx_errors: 0 > rx_missed: 0 > align_errors: 0 > tx_single_collisions: 0 > tx_multi_collisions: 0 > unicast: 1555884 > broadcast: 78 > multicast: 4 > tx_aborted: 0 > tx_underrun: 0 > > iperf receive: > ----------------------------------------------------------- > Server listening on 5201 > ----------------------------------------------------------- > Accepted connection from 10.x.x.x, port 55516 > [ 5] local 10.x.x.x port 5201 connected to 10.x.x.x port 58172 > [ ID] Interval Transfer Bitrate > [ 5] 0.00-1.00 sec 108 MBytes 906 Mbits/sec > [ 5] 1.00-2.00 sec 112 MBytes 941 Mbits/sec > [ 5] 2.00-3.00 sec 112 MBytes 940 Mbits/sec > [ 5] 3.00-4.00 sec 112 MBytes 941 Mbits/sec > [ 5] 4.00-5.00 sec 112 MBytes 941 Mbits/sec > [ 5] 5.00-6.00 sec 112 MBytes 942 Mbits/sec > [ 5] 6.00-7.00 sec 112 MBytes 939 Mbits/sec > [ 5] 7.00-8.00 sec 112 MBytes 941 Mbits/sec > [ 5] 8.00-9.00 sec 112 MBytes 938 Mbits/sec > [ 5] 9.00-10.00 sec 112 MBytes 941 Mbits/sec > [ 5] 10.00-11.00 sec 112 MBytes 941 Mbits/sec > [...] > [ 5] 50.00-51.00 sec 112 MBytes 941 Mbits/sec > [ 5] 51.00-52.00 sec 112 MBytes 941 Mbits/sec > [ 5] 52.00-53.00 sec 112 MBytes 942 Mbits/sec > [ 5] 53.00-54.00 sec 112 MBytes 941 Mbits/sec > [ 5] 54.00-55.00 sec 111 MBytes 934 Mbits/sec > [ 5] 55.00-56.00 sec 112 MBytes 942 Mbits/sec > [ 5] 56.00-57.00 sec 112 MBytes 937 Mbits/sec > [ 5] 57.00-58.00 sec 112 MBytes 941 Mbits/sec > [ 5] 58.00-59.00 sec 111 MBytes 932 Mbits/sec > [ 5] 59.00-60.00 sec 112 MBytes 942 Mbits/sec > [ 5] 60.00-60.04 sec 4.06 MBytes 939 Mbits/sec > - - - - - - - - - - - - - - - - - - - - - - - - - > [ ID] Interval Transfer Bitrate > [ 5] 0.00-60.04 sec 6.57 GBytes 940 Mbits/sec receiver > > regards, > David > Heiner