From: Tom Lendacky <thomas.lendacky@amd.com>
To: David Miller <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <christoffer.dall@linaro.org>
Subject: Re: [PATCH net] amd-xgbe: Use wmb before updating current descriptor count
Date: Fri, 23 Oct 2015 08:35:52 -0500 [thread overview]
Message-ID: <562A37B8.2090108@amd.com> (raw)
In-Reply-To: <20151023.025943.873672852211823864.davem@davemloft.net>
On 10/23/2015 04:59 AM, David Miller wrote:
> From: Tom Lendacky <thomas.lendacky@amd.com>
> Date: Wed, 21 Oct 2015 15:37:05 -0500
>
>> The code currently uses the lightweight dma_wmb barrier before updating
>> the current descriptor count. Under heavy load, the Tx cleanup routine
>> was seeing the updated current descriptor count before the updated
>> descriptor information. As a result, the Tx descriptor was being cleaned
>> up before it was used because it was not "owned" by the hardware yet,
>> resulting in a Tx queue hang.
>>
>> Using the wmb barrier insures that the descriptor is updated before the
>> descriptor counter preventing the Tx queue hang. For extra insurance,
>> the Tx cleanup routine is changed to grab the current decriptor count on
>> entry and uses that initial value in the processing loop rather than
>> trying to chase the current value.
>>
>> Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
>> Tested-by: Christoffer Dall <christoffer.dall@linaro.org>
>
> Applied, thanks.
Hi David,
Can you queue this up for stable? It is applicable to 4.1 and 4.2.
Thanks,
Tom
>
next prev parent reply other threads:[~2015-10-23 13:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-21 20:37 [PATCH net] amd-xgbe: Use wmb before updating current descriptor count Tom Lendacky
2015-10-23 9:59 ` David Miller
2015-10-23 13:35 ` Tom Lendacky [this message]
2015-10-23 14:02 ` David Miller
2015-10-23 16:29 ` Alexander Duyck
2015-10-23 16:57 ` Tom Lendacky
2015-10-24 0:43 ` David Miller
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=562A37B8.2090108@amd.com \
--to=thomas.lendacky@amd.com \
--cc=christoffer.dall@linaro.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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).