From: "Lendacky, Thomas" <Thomas.Lendacky@amd.com>
To: Florian Fainelli <f.fainelli@gmail.com>,
Jose Abreu <jose.abreu@synopsys.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Joao Pinto <joao.pinto@synopsys.com>,
"David S . Miller" <davem@davemloft.net>,
Giuseppe Cavallaro <peppe.cavallaro@st.com>,
Alexandre Torgue <alexandre.torgue@st.com>
Subject: Re: [PATCH net-next 1/3] net: stmmac: Fix NAPI poll in TX path when in multi-queue
Date: Sat, 16 Feb 2019 17:21:53 +0000 [thread overview]
Message-ID: <d3f2bd0a-bc2c-a340-17bc-58356bd7a6a9@amd.com> (raw)
In-Reply-To: <c6a38836-a0d7-608d-39cf-ea770db78c95@gmail.com>
On 2/15/19 6:35 PM, Florian Fainelli wrote:
> On 2/15/19 5:42 AM, Jose Abreu wrote:
>> Commit 8fce33317023 introduced the concept of NAPI per-channel and
>> independent cleaning of TX path.
>>
>> This is currently breaking performance in some cases. The scenario
>> happens when all packets are being received in Queue 0 but the TX is
>> performed in Queue != 0.
>>
>> Fix this by using different NAPI instances per each TX and RX queue, as
>> suggested by Florian.
>>
>> Signed-off-by: Jose Abreu <joabreu@synopsys.com>
>> Cc: Florian Fainelli <f.fainelli@gmail.com>
>> Cc: Joao Pinto <jpinto@synopsys.com>
>> Cc: David S. Miller <davem@davemloft.net>
>> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
>> Cc: Alexandre Torgue <alexandre.torgue@st.com>
>> ---
>
> [snip]
>
>> - if (work_done < budget && napi_complete_done(napi, work_done)) {
>> - int stat;
>> + priv->xstats.napi_poll++;
>>
>> + work_done = stmmac_tx_clean(priv, budget, chan);
>> + if (work_done < budget && napi_complete_done(napi, work_done))
>
> You should not be bounding your TX queue against the NAPI budge, it
> should run unbound and clean as much as it can, which could be the
> entire ring size if that is how many packets you pushed between
> interrupts. That could be the cause of poor performance as well.
Won't returning the budget value cause this napi_poll routine to be called
again, where the driver can continue to clean TX packets? I thought this
just gives other drivers the opportunity to run their napi_poll routines
in between so as not to be starved.
Thanks,
Tom
>
next prev parent reply other threads:[~2019-02-16 17:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-15 13:42 [PATCH net-next 0/3] net: stmmac: Performance improvements in Multi-Queue Jose Abreu
2019-02-15 13:42 ` [PATCH net-next 1/3] net: stmmac: Fix NAPI poll in TX path when in multi-queue Jose Abreu
2019-02-16 0:35 ` Florian Fainelli
2019-02-16 17:21 ` Lendacky, Thomas [this message]
2019-02-15 13:42 ` [PATCH net-next 2/3] net: stmmac: dwmac4: Also use TBU interrupt to clean TX path Jose Abreu
2019-02-15 13:42 ` [PATCH net-next 3/3] net: stmmac: dwxgmac2: " Jose Abreu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d3f2bd0a-bc2c-a340-17bc-58356bd7a6a9@amd.com \
--to=thomas.lendacky@amd.com \
--cc=alexandre.torgue@st.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=joao.pinto@synopsys.com \
--cc=jose.abreu@synopsys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).