Received: by 2002:a25:d783:0:0:0:0:0 with SMTP id o125csp407171ybg; Thu, 19 Mar 2020 01:56:09 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvH2fy/x9yYDwJ2AM7hk4RB00y1JgzbBRyWlw1ICW7OFfLG6Yv61GqfAyVzsrT9DDsjrj2i X-Received: by 2002:a9d:560b:: with SMTP id e11mr1337121oti.226.1584608169482; Thu, 19 Mar 2020 01:56:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584608169; cv=none; d=google.com; s=arc-20160816; b=r0FaY1vODhvYRs221Rr7hh+a8cvTpknVzz/3p1OWg0D6sXtqtLtC0HoGgAsFPcCjAJ aipWbyLp0P7g8R0HfWPt/R/4BCCtVvSibgqk38ivlbL4IMbtj0RvoVWzWS94VXh5c5By QJKYbNm56wkg20IpEPoBRYtTNdXrcwMzuBf8JBpTr+LtQUU7yO+/PJtUnt7fqTOMmU6o e6hKx2Olm8qAqb+OrKuMnFBS7hFZ+Q7hHLQipHWyvoPeqUfgRBc5tIJGsRNDXiPm9DA4 pDBu0QB6pe3wXHaHcKBEK/95Xao+GizeYqhPK52aAeiepCBc5I7bHh42NPE3r/PD9B28 e/vA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=eVjeTiEe/+Y3kUb7qbMJcMEcD/Uy3XR+Yh9sVuFlyd4=; b=Ce86ucEBVRLe1CSek1DGX+961Wq7/6Kqx0DgJxKVeFTWLMwM+jyrr9xpeSObVMpCB0 J5CdIGisCEr192HocMIfY7MCY0f8zqToGApegjbRdRiD+yxxASnOLPzKO1ERaslBjBO5 S2mIMibPFepAPN/SltFmARXNG0fMan7/4p5Cbl3zn4Q9Zreg6/VcB853RvzhttWOpLrm lB/Rb2j0kqjJWWm0DRHZHh28BpRiQfnyOvmRU2Wrl/6vtOnK8Et4tAh9dG5bUzMGD7UJ t2udsH7knEpFH5hztVhpnqPf0/muH+hI8GXvTtBmUpcN6hnlSsTZm9y33REs2kyCezET YitA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=TwPtUfFd; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c17si820927otr.109.2020.03.19.01.55.57; Thu, 19 Mar 2020 01:56:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-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=@broadcom.com header.s=google header.b=TwPtUfFd; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726063AbgCSIzv (ORCPT + 99 others); Thu, 19 Mar 2020 04:55:51 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:52112 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725787AbgCSIzv (ORCPT ); Thu, 19 Mar 2020 04:55:51 -0400 Received: by mail-wm1-f67.google.com with SMTP id c187so1077817wme.1 for ; Thu, 19 Mar 2020 01:55:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=eVjeTiEe/+Y3kUb7qbMJcMEcD/Uy3XR+Yh9sVuFlyd4=; b=TwPtUfFdBD4KBGsiIuSa1xJI7B8czzFlcPomUaVkeNyOGEFYdJ13CmpFJNUoj8BPaN BMWr+MI6eg9MFO+S9qGF/CFZyxkWkhCv/ckmf2Fp872hrbG8Vkrd4+XuGFQdl6v3/Sjd /P81OWHtEBf3hs3RE1GLcIcekE/7m1KGB4Ujo= 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=eVjeTiEe/+Y3kUb7qbMJcMEcD/Uy3XR+Yh9sVuFlyd4=; b=aFSLXrwkdxuFsM+6Ul9HVdixDORb3ss/L2XSgn/HfHUfvadhyGO/8/HRYb3YUiAna5 GvnR7d2W6ERxlj8/2m5CENOZUIKHl53eFrf2wSk375ZGna+dXfbkUpT+68FrwhVX9vls LfJK2kvp+gSn8V4qD0Dfml5Z6KPbu80NjkbPAmvKqJclspPJetpaOw9/xCz3tFHVAtRb 5THMjja7f5aYx9owKzjbnZmwXAFIIvRNrR3M/GI9cztRd4/psE+0uDElZ7WXltpJct8w 09c7sUe1MwFwdykwReF1TIdKKgy48RCvoQZrcjOSlJjKNsw7VoXbHwVhWIc6yVkKHbuv UabA== X-Gm-Message-State: ANhLgQ3WpmjhjmwdyvPVO17DHNhLtAZgXjUiA2qiqXCG+qbuHwjVp5ed c7pHFsbXWGPVG05aW8PYoj3HvQ== X-Received: by 2002:a1c:7ec9:: with SMTP id z192mr2434340wmc.100.1584608149090; Thu, 19 Mar 2020 01:55:49 -0700 (PDT) Received: from [10.230.41.113] ([192.19.215.251]) by smtp.gmail.com with ESMTPSA id i12sm2598303wro.46.2020.03.19.01.55.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Mar 2020 01:55:48 -0700 (PDT) Subject: Re: [PATCH 3/3] brcmfmac: make setting SDIO workqueue WQ_HIGHPRI a module parameter To: Wright Feng , franky.lin@broadcom.com, hante.meuleman@broadcom.com, kvalo@codeaurora.org, chi-hsien.lin@cypress.com Cc: linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, tj@kernel.org References: <1584604406-15452-1-git-send-email-wright.feng@cypress.com> <1584604406-15452-4-git-send-email-wright.feng@cypress.com> From: Arend Van Spriel Message-ID: <40e33702-d37f-085d-a5a7-7f09ae9e2629@broadcom.com> Date: Thu, 19 Mar 2020 09:55:46 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <1584604406-15452-4-git-send-email-wright.feng@cypress.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org + Tejun - regarding alloc_workqueue usage On 3/19/2020 8:53 AM, Wright Feng wrote: > With setting sdio_wq_highpri=1 in module parameters, tasks submitted to > SDIO workqueue will put at the head of the queue and run immediately. > This parameter is for getting higher TX/RX throughput with SDIO bus. > > Signed-off-by: Wright Feng > Signed-off-by: Chi-hsien Lin > --- > .../wireless/broadcom/brcm80211/brcmfmac/common.c | 5 +++++ > .../wireless/broadcom/brcm80211/brcmfmac/common.h | 2 ++ > .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 22 ++++++++++++++-------- > 3 files changed, 21 insertions(+), 8 deletions(-) > [...] > diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c > index 3a08252..885e8bd 100644 > --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c > +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c > @@ -4342,9 +4342,21 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev) > bus->txminmax = BRCMF_TXMINMAX; > bus->tx_seq = SDPCM_SEQ_WRAP - 1; > > + /* attempt to attach to the dongle */ > + if (!(brcmf_sdio_probe_attach(bus))) { > + brcmf_err("brcmf_sdio_probe_attach failed\n"); > + goto fail; > + } > + > /* single-threaded workqueue */ > - wq = alloc_ordered_workqueue("brcmf_wq/%s", WQ_MEM_RECLAIM, > - dev_name(&sdiodev->func1->dev)); > + if (sdiodev->settings->sdio_wq_highpri) { > + wq = alloc_workqueue("brcmf_wq/%s", > + WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_UNBOUND, > + 1, dev_name(&sdiodev->func1->dev)); So two things changed, 1) WQ_HIGHPRI flag added *and* 2) use allow_workqueue basically dropping __WQ_ORDERED. Not sure which one contributes to the behavior described in the commit message. Regards, Arend > + } else { > + wq = alloc_ordered_workqueue("brcmf_wq/%s", WQ_MEM_RECLAIM, > + dev_name(&sdiodev->func1->dev)); > + } > if (!wq) { > brcmf_err("insufficient memory to create txworkqueue\n"); > goto fail;