netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
To: David Miller <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>
Subject: Re: [PATCH (net.git) 5/6] stmmac: remove useless check in the stmmac_tx_clean
Date: Thu, 27 Feb 2014 10:59:01 +0100	[thread overview]
Message-ID: <530F0C65.4080905@st.com> (raw)
In-Reply-To: <20140226.161422.431061479377150157.davem@davemloft.net>

On 2/26/2014 10:14 PM, David Miller wrote:
> From: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> Date: Wed, 26 Feb 2014 09:01:06 +0100
>
>> There is an useless if condition that this patch is removing
>> when the driver cleans the tx resources.
>>
>> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
>
> It is not useless, the first check is optimistic and lock free.
>
> You must retest the condition under the lock in order to avoid
> spurious wakeups.
>
> Such a spurious wakeup could overlap another asynchronous context
> filling the TX queue and sleeping it, resulting in corruption.
>
> Furthermore, that cleanup patch in this series is absolutely not
> appropriate for 'net' which is for real bug fixes only.  Specifically
> I'm talking about patch #4.
>
>

Ok  I will send the patches w/o the #4. Thx for your advice

peppe

  reply	other threads:[~2014-02-27  9:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-26  8:01 [PATCH (net.git) 0/6] stmmac: fix EEE and chained mode Giuseppe Cavallaro
2014-02-26  8:01 ` [PATCH (net.git) 1/6 (v2)] stmmac: disable at run-time the EEE if not supported Giuseppe Cavallaro
2014-02-26  8:01 ` [PATCH (net.git) 2/6] stmmac: fix and better tune the default buffer sizes Giuseppe Cavallaro
2014-02-26  8:01 ` [PATCH (net.git) 3/6] stmmac: dwmac-sti: fix broken STiD127 compatibility Giuseppe Cavallaro
2014-02-26  8:01 ` [PATCH (net.git) 4/6] stmmac: dwmac-sti: remove useless tx_retime_srcs Giuseppe Cavallaro
2014-02-26  8:01 ` [PATCH (net.git) 5/6] stmmac: remove useless check in the stmmac_tx_clean Giuseppe Cavallaro
2014-02-26 21:14   ` David Miller
2014-02-27  9:59     ` Giuseppe CAVALLARO [this message]
2014-02-26  8:01 ` [PATCH (net.git) 6/6] stmmac: fix chained mode Giuseppe Cavallaro
  -- strict thread matches above, loose matches on Subject: below --
2014-02-25  9:58 [PATCH (net.git) 1/6] stmmac: disable at run-time the EEE if not supported Giuseppe Cavallaro
2014-02-25  9:58 ` [PATCH (net.git) 5/6] stmmac: remove useless check in the stmmac_tx_clean Giuseppe Cavallaro

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=530F0C65.4080905@st.com \
    --to=peppe.cavallaro@st.com \
    --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).