Received: by 10.192.165.148 with SMTP id m20csp335305imm; Wed, 9 May 2018 13:34:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpRCpkcuGln28raLFfp4nXi3V2WRxm6mPDyr2oCk9R8Z3Nov6phUErluyCh0KeHCJ2splIM X-Received: by 2002:a17:902:8647:: with SMTP id y7-v6mr20135819plt.86.1525898063863; Wed, 09 May 2018 13:34:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525898063; cv=none; d=google.com; s=arc-20160816; b=xAGzCA65NQgWUVKd9VvnQvpMUF/nFEHnHzWifqQYjRlnukA/FkQlQFKfYIrgaEH9SQ nmeDD5+XQpVsEIbmX52OpLrbhmzJAYsUg/ifDfVXfbzYfKWiC4eh/yxbcoSuxl/FHMDC 4rq6W1Zm82+l23RljvKRGW2AskaO8iap1oXSGtegWMxRO9ZXmrakJJGsXOoIgIMyjjdK VpoWHARBoKjmG2BAKyZppVQQmvXXLo6zbyX9kM7hGVPup3eQI0Iq1fh9uq7zvncCLFsb idr2gvM8S0lHPrIi1cejw5nD01I7m/3sYLYIGO6Wq7dfuJJppSbryie4TCWhHeD2bOiF mZqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=4Ou6OiF93IpDKG829MGuGh8AXdbo+oT3JcPbH3Ne8us=; b=B9vd5lls5O0+RLTR5R1x5BUk36daW047Sn8Uqk95mnKsGraBvFfRJBerqxlHVeuj/j uvSqxPtWpQeu7+l5kqvR8SYbxFRXclU/Pqz4YvOOS2LZuGCUME/h2+FZO2v7Dh4bqn24 GHjI8jXxhBHyrxyD1bCdA993lnv6I1BPch+SxUfsx4a0SUHBLq2wBZZOlW11dMqhgtyr 2wyC+qZ0NfP80vmwylvJsxP0rPsFyhLWPeSmyQl8dy6jFi8R00EZ0Mhbu1VTKxHng5zR d3IK0Jy4jTWyggBj+0NFz251WwYvnntpgiCEK2SLEv/yi966p3L/9mf9XZGZsBPrHzud 9F2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fn/rduZK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s71si16920730pfi.74.2018.05.09.13.34.08; Wed, 09 May 2018 13:34:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fn/rduZK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965244AbeEIUdz (ORCPT + 99 others); Wed, 9 May 2018 16:33:55 -0400 Received: from mail-pg0-f54.google.com ([74.125.83.54]:45498 "EHLO mail-pg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935230AbeEIUdx (ORCPT ); Wed, 9 May 2018 16:33:53 -0400 Received: by mail-pg0-f54.google.com with SMTP id w3-v6so2642053pgv.12; Wed, 09 May 2018 13:33:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=4Ou6OiF93IpDKG829MGuGh8AXdbo+oT3JcPbH3Ne8us=; b=fn/rduZKf0g+5GfO7rtTejQgTT1JN5tp5dmDzzDupfjnNqvSYynCJkDBlNhgtssgjR brry/QJEanAr6QYZFMTE8Frr1oFtY8u6Ii/VUuTbsI2qD4c4IuNJasvtdsEwp8hwkD5/ SFJTD9SKXn7bqYk5oQ9SdzWnByQ6grvpo7N77tGfS3TuSNhVukwUFO94A/w2OomI1cH0 N+rXjDVw+3jzgbNywQaT8HjchefSig73RpwJUX6BjexdvggTZgsWYU1Uvq6tZCmrJi63 p670sGFg8VXxY6/olMe+TRLIbPJmpxMSfdd3zIZ82wJUYcaQnWTYtpU8BLAnHMrc1slw OINA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=4Ou6OiF93IpDKG829MGuGh8AXdbo+oT3JcPbH3Ne8us=; b=tjACI11AAHMgKs1wqCKzT8rOKM/AL1ANUS+utDgMMPbKdtGm3IRiGgZZDLFbJsd914 5lZeUiOXQpWV1M6bXllzOLe06wtDhpR8LZaRjb1DZKzm+cIKZaJFrYC2E1ushekCUywi ZHcVuor5hOQJ0ihpacTQf+rhx7Lcvgg4iBarWCQ3NcsGAQYRdJitAYkzlLW54CIN7pvV d4ABBmvNm/r7nGPZJv7QDzFVws86PzZ0XtjFOe9GPpowb7bi76JfwC0ybzhGxM8SfqHo ba8vvU9Kxa3SxT01mT01NXV1fcWMMS7qktuOLi9fubjvAQ7XlhlnXAxREcE2SUaNzHes xI8g== X-Gm-Message-State: ALQs6tAJmJJvTwHaa40Swj3N9Ds5AiPZ1GhGdSP3lNIbYxR+Ha0HLaEx 00SBvrRq9//0kI5NjlPFE82PpHpcYriTduJ1GYQ= X-Received: by 10.98.34.219 with SMTP id p88mr13058404pfj.239.1525898032447; Wed, 09 May 2018 13:33:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.138.8 with HTTP; Wed, 9 May 2018 13:33:11 -0700 (PDT) In-Reply-To: <1525768634.2885.11.camel@realtek.com> References: <059b40f0-b8e2-b55f-92d5-a859ba4204a4@lwfinger.net> <5B2DA6FDDF928F4E855344EE0A5C39D13BEC14C0@RTITMBSV07.realtek.com.tw> <1525240713.3735.3.camel@realtek.com> <1525768634.2885.11.camel@realtek.com> From: =?UTF-8?Q?Jo=C3=A3o_Paulo_Rechi_Vita?= Date: Wed, 9 May 2018 13:33:11 -0700 Message-ID: Subject: Re: RTL8723BE performance regression To: Pkshih Cc: "linux-kernel@vger.kernel.org" , "Larry.Finger@lwfinger.net" , "jprvita@endlessm.com" , Birming Chiu , "drake@endlessm.com" , Chaoming_Li , "kvalo@codeaurora.org" , =?UTF-8?B?6I6K5b2l5a6j?= , "derosier@gmail.com" , Steven Ting , "netdev@vger.kernel.org" , "linux@endlessm.com" , Shaofu , "linux-wireless@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 8, 2018 at 1:37 AM, Pkshih wrote: > On Mon, 2018-05-07 at 14:49 -0700, Jo=C3=A3o Paulo Rechi Vita wrote: >> On Tue, May 1, 2018 at 10:58 PM, Pkshih wrote: >> > On Wed, 2018-05-02 at 05:44 +0000, Pkshih wrote: >> >> >> >> > -----Original Message----- >> >> > From: Jo=C3=A3o Paulo Rechi Vita [mailto:jprvita@gmail.com] >> >> > Sent: Wednesday, May 02, 2018 6:41 AM >> >> > To: Larry Finger >> >> > Cc: Steve deRosier; =E8=8E=8A=E5=BD=A5=E5=AE=A3; Pkshih; Birming Ch= iu; Shaofu; Steven Ting; Chaoming_Li; Kalle Valo; >> >> > linux-wireless; Network Development; LKML; Daniel Drake; Jo=C3=A3o = Paulo Rechi Vita; linux@endless >> m.c >> >> om >> >> > Subject: Re: RTL8723BE performance regression >> >> > >> >> > On Tue, Apr 3, 2018 at 7:51 PM, Larry Finger wrote: >> >> > > On 04/03/2018 09:37 PM, Jo=C3=A3o Paulo Rechi Vita wrote: >> >> > >> >> >> > >> On Tue, Apr 3, 2018 at 7:28 PM, Larry Finger >> >> > >> wrote: >> >> > >> >> >> > >> (...) >> >> > >> >> >> > >>> As the antenna selection code changes affected your first bisec= tion, do >> >> > >>> you >> >> > >>> have one of those HP laptops with only one antenna and the inco= rrect >> >> > >>> coding >> >> > >>> in the FUSE? >> >> > >> >> >> > >> >> >> > >> Yes, that is why I've been passing ant_sel=3D1 during my tests -= - this >> >> > >> was needed to achieve a good performance in the past, before thi= s >> >> > >> regression. I've also opened the laptop chassis and confirmed th= e >> >> > >> antenna cable is plugged to the connector labeled with "1" on th= e >> >> > >> card. >> >> > >> >> >> > >>> If so, please make sure that you still have the same signal >> >> > >>> strength for good and bad cases. I have tried to keep the drive= r and the >> >> > >>> btcoex code in sync, but there may be some combinations of ante= nna >> >> > >>> configuration and FUSE contents that cause the code to fail. >> >> > >>> >> >> > >> >> >> > >> What is the recommended way to monitor the signal strength? >> >> > > >> >> > > >> >> > > The btcoex code is developed for multiple platforms by a differen= t group >> >> > > than the Linux driver. I think they made a change that caused ant= _sel to >> >> > > switch from 1 to 2. At least numerous comments at >> >> > > github.com/lwfinger/rtlwifi_new claimed they needed to make that = change. >> >> > > >> >> > > Mhy recommended method is to verify the wifi device name with "iw= dev". Then >> >> > > using that device >> >> > > >> >> > > sudo iw dev scan | egrep "SSID|signal" >> >> > > >> >> > >> >> > I have confirmed that the performance regression is indeed tied to >> >> > signal strength: on the good cases signal was between -16 and -8 dB= m, >> >> > whereas in bad cases signal was always between -50 to - 40 dBm. I'v= e >> >> > also switched to testing bandwidth in controlled LAN environment us= ing >> >> > iperf3, as suggested by Steve deRosier, with the DUT being the only >> >> > machine connected to the 2.4 GHz radio and the machine running the >> >> > iperf3 server connected via ethernet. >> >> > >> >> >> >> We have new experimental results in commit af8a41cccf8f46 ("rtlwifi: = cleanup >> >> 8723be ant_sel definition"). You can use the above commit and do the = same >> >> experiments (with ant_sel=3D0, 1 and 2) in your side, and then share = your results. >> >> Since performance is tied to signal strength, you can only share sign= al strength. >> >> >> > >> > Please pay attention to cold reboot once ant_sel is changed. >> > >> >> I've tested the commit mentioned above and it fixes the problem on top >> of v4.16 (in addition to the latest wireless-drivers-next also been >> fixed as it already contains such commit). On v4.15, we also need the >> following commits before "af8a41cccf8f rtlwifi: cleanup 8723be ant_sel >> definition" to have a good performance again: >> >> 874e837d67d0 rtlwifi: fill FW version and subversion >> a44709bba70f rtlwifi: btcoex: Add power_on_setting routine >> 40d9dd4f1c5d rtlwifi: btcoex: Remove global variables from btcoex > > v4.15 isn't longterm version and had been EOL. > Right, but this is a performace regression in comparison to v4.11, so if "af8a41cccf8f rtlwifi: cleanup 8723be ant_sel definition" is marked for stable, shouldn't these other patches be brought as well? All releases since v4.11 are probably affected, but honestly I don't have a strong understanding of how the stable trees operate in situations like this. >> >> Surprisingly, it seems forcing ant_sel=3D1 is not needed anymore on >> these machines, as the shown by the numbers bellow (ant_sel=3D0 means >> that actually no parameter was passed to the module). I have powered >> off the machine and done a cold boot for every test. It seems >> something have changed in the antenna auto-selection code since v4.11, >> the latest point where I could confirm we definitely need to force >> ant_sel=3D1. I've been trying to understand what causes this difference, >> but haven't made progress on that so far, so any suggestions are >> appreciated (we are trying to decide if we can confidently drop the >> downstream DMI quirks for these specific machines). >> > I think your rtl8723be module programed correct efuse content, so it > works properly with ant_sel=3D0, and quirk isn't required for your > machine. > >> w-d-n ant_sel=3D0: -14.00 dBm, 69.5 Mbps -> good >> w-d-n ant_sel=3D1: -10.00 dBm, 41.1 Mbps -> good >> w-d-n ant_sel=3D2: -44.00 dBm, 607 kbps -> bad >> >> v4.16 ant_sel=3D0: -12.00 dBm, 63.0 Mbps -> good >> v4.16 ant_sel=3D1: - 8.00 dBm, 69.0 Mbps -> good >> v4.16 ant_sel=3D2: -50.00 dBm, 224 kbps -> bad >> >> v4.15 ant_sel=3D0: - 8.00 dBm, 33.0 Mbps -> good >> v4.15 ant_sel=3D1: -10.00 dBm, 38.1 Mbps -> good >> v4.15 ant_sel=3D2: -48.00 dBm, 206 kbps -> bad >> > > With your results, the efuse content is programmed as one or two antenna > on AUX path. > With v4.11 I had good performance results on this very same machine (thus same efuse contents) only when passing ant_sel=3D1, so there has to be some change on the code that parses the efuse contents and decides which antenna will be used. -- Jo=C3=A3o Paulo Rechi Vita http://about.me/jprvita