Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp4061621rwe; Mon, 17 Apr 2023 07:27:50 -0700 (PDT) X-Google-Smtp-Source: AKy350YU2DjQ88TmwL0hwb3JXgo7GCIGOeT/K9a5BBrChqIzXlVxeSxHGeb5sidh5HK/lVkM3aGA X-Received: by 2002:a05:6a20:12c7:b0:f0:69db:ec25 with SMTP id v7-20020a056a2012c700b000f069dbec25mr363466pzg.25.1681741669911; Mon, 17 Apr 2023 07:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681741669; cv=none; d=google.com; s=arc-20160816; b=WjYw2Nn7i4thkdVoQjFR8bVB/2uUD6BF2o2bugTB4QRPhYP2w3zEgiFAHkaLaivh5G 7uKEvHwPt/yaWqD4dYP03nK04m0aty35CKIeIIxyK3sVQj3Zfb2X4Ma6XMBHd5XwwCUx P6LNMKEIbfCzFxkASL6AdGEShwS1DHv2ZmwjE57mvVr0UqP7kKqjC6I1aqY7U7r08ujw OjCzjICVmEGyv66+/lV6ZIjUXVB5tQw+kMALwXj9LHXiJhG25pNycR8G9pnIMpmCHiQJ 8GiEcpt+aiDR7x8DVI+HYS714p/8nrlY779khdvAJvcmFCtmBzkd4KjHKI5BVY7SFYba Df2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=SwpvU/aDqnYP9uYrUWRSl4fWT14kzkFaeRM5tUD57NE=; b=dJ0R3goGceIMKKsCJ6g0/NVtz7NybvAbMimsRQaoepvuKNHubshX2j7JYlmNucKDhH IkCadIetrA9xThbxrBRwHcPz8deliGTxPX1tDTYB+CWQghkuQ7idYLSlQCiTiBJhcef6 mjkE4I0Dk1bGrIqbxm9oDkJXxLyhW+Bdkc+PbWn4Y5NgnawuU0xTxBBJTXzIPbq0tdGr OxdepGEKnQrNZD5Aa7QI+jsxgLr8CEIab+KTDKcvoINGNWTSVu2oTk4Glu41xQwVevN8 vAsOfNoOapV7ntOFVTTRR9mK7jpidAPTr75RkUNNtVM7dgcPtgNUo9P6NgyYkR3dckvk JHQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@free.fr header.s=smtp-20201208 header.b=MsSERrn9; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=free.fr Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h4-20020a635744000000b0050bd9c7bc1bsi10328766pgm.30.2023.04.17.07.27.38; Mon, 17 Apr 2023 07:27:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@free.fr header.s=smtp-20201208 header.b=MsSERrn9; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=free.fr Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230331AbjDQOW7 (ORCPT + 63 others); Mon, 17 Apr 2023 10:22:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230315AbjDQOWx (ORCPT ); Mon, 17 Apr 2023 10:22:53 -0400 Received: from smtp2-g21.free.fr (smtp2-g21.free.fr [212.27.42.2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA9A597; Mon, 17 Apr 2023 07:22:50 -0700 (PDT) Received: from [192.168.108.81] (unknown [213.36.7.13]) (Authenticated sender: marc.w.gonzalez@free.fr) by smtp2-g21.free.fr (Postfix) with ESMTPSA id 3EFC1200408; Mon, 17 Apr 2023 16:22:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1681741368; bh=kTItlP2YI88NnNFYbognrrCdZc5bTlLjB1ZMOm34g6U=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=MsSERrn9h14PSHh54N2ikHlA+O74JGfn36OIedPCdtTmuMqOnBVBAAsLewloQRRCe rrpRlg2tSOtadjkCAj2ew+lRBDyk1YeRiAqg/wHArTL9vMqeERTfowuhsHCLXSJoOQ xHv9cLQjw5pSUPmN7/qHUyQLijPOBwGpB+uVsBopNA8nDFexILcm0+56twRPvvOc1S GAX6FyFjz1sE/PSzriMkUKtDcMFOZ4s9zZGd+nJ2oyKNbm5LNAWkEalID9QYNDxc+m VQgfGbtQg/cAkIfN6hWw/UrH40uaUB/yqW20LzE908hom1sUa+j39Ww/OFDM7VFoDk pjSk2EQJOj0Fg== Message-ID: Date: Mon, 17 Apr 2023 16:22:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [Performance regression] BCM4359/9 on S905X2 Content-Language: en-US From: Marc Gonzalez To: AML Cc: Martin Blumenstingl , Christian Hewitt , Linux Wireless , MMC , Neil Armstrong , Ulf Hansson , Pierre-Hugues Husson References: <1jh6ue74x9.fsf@starbuckisacylon.baylibre.com> <0bb1e3b3-6823-ddb5-001b-72ee1b63779c@free.fr> <74feca6f-4177-5645-6614-bc5f3dbf0be1@free.fr> In-Reply-To: <74feca6f-4177-5645-6614-bc5f3dbf0be1@free.fr> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, NUMERIC_HTTP_ADDR,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 06/04/2023 18:35, Marc Gonzalez wrote: > # curl -o /dev/null http://192.168.1.254:8095/fixed/1G > % Total % Received % Xferd Average Speed Time Time Time Current > Dload Upload Total Spent Left Speed > 100 1024M 100 1024M 0 0 9747k 0 0:01:47 0:01:47 --:--:-- 9544k I was able to import the bcmdhd driver from: https://android.googlesource.com/kernel/hikey-linaro/+log/refs/heads/android-amlogic-bmeson-6.1/drivers/net/wireless/bcmdhd as pointed out by Neil. I switched from brcmfmac to bcmdhd with: -CONFIG_BRCMFMAC=y -CONFIG_BRCMDBG=y +CONFIG_BCMDHD=y +CONFIG_BCMDHD_FW_PATH="" +CONFIG_BCMDHD_NVRAM_PATH="" +CONFIG_BCMDHD_SDIO_IRQ=y and hard-coded the FW paths in dhd_set_path_params(). Here are the benchmark results on the bcm4359 (AP6398SR3 module) # curl -o /dev/null http://192.168.1.254:8095/fixed/1G % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1024M 100 1024M 0 0 17.3M 0 0:00:58 0:00:58 --:--:-- 17.4M which is noticeably faster (80%) than brcmfmac results. FTR, system was 18.5% busy for this benchmark: 81.5653% 195114 0:swapper 13.8287% 33080 57:irq/17-ffe03000 1.3967% 3341 173:curl 1.1350% 2715 63:dhd_rxf 1.0455% 2501 129:ksdioirqd/mmc2 1.0004% 2393 62:dhd_dpc 0.0167% 40 171:perf 0.0088% 21 19:ksoftirqd/1 I was not able to get the driver to work with bcm43752 (AP6398SR32 module). It loops with: [ 15.221622] wl_run_escan: LEGACY_SCAN sync ID: 0, bssidx: 0 [ 15.221661] CFG80211-ERROR) wl_run_escan : [ 15.221664] Escan set error (-37) [ 15.229067] dhd_ioctl_entry_local invalid parameter [ 15.233902] CFG80211-ERROR) wl_run_escan : [ 15.233904] error (-37), cnt=1 [ 15.241056] CFG80211-ERROR) wl_cfg80211_scan : [ 15.241059] scan error (-11) But I may have bungled adding the "new" chip, since the driver architecture is... [censored]. I suppose the conclusion is: 1) bcmdhd is 80% faster than brcmfmac in one download scenario 2) CPU usage scales linearly with throughput (on this system, 1% ~ 7 Mbps) Regards