linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: pavel@ucw.cz
Cc: LinoSanfilippo@gmx.de, bh74.an@samsung.com, ks.giri@samsung.com,
	vipul.pandya@samsung.com, peppe.cavallaro@st.com,
	alexandre.torgue@st.com, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH 2/2] net: ethernet: stmmac: remove private tx queue lock
Date: Thu, 08 Dec 2016 10:26:41 -0500 (EST)	[thread overview]
Message-ID: <20161208.102641.2159772626439340664.davem@davemloft.net> (raw)
In-Reply-To: <20161208140846.GA24327@amd>

From: Pavel Machek <pavel@ucw.cz>
Date: Thu, 8 Dec 2016 15:08:46 +0100

> On Wed 2016-12-07 18:41:11, David Miller wrote:
>> From: Pavel Machek <pavel@ucw.cz>
>> Date: Wed, 7 Dec 2016 22:37:57 +0100
>> 
>> > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>> > index 982c952..7415bc2 100644
>> > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>> > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>> > @@ -1308,7 +1308,7 @@ static void stmmac_tx_clean(struct stmmac_priv *priv)
>> >  	unsigned int bytes_compl = 0, pkts_compl = 0;
>> >  	unsigned int entry = priv->dirty_tx;
>> >  
>> > -	spin_lock(&priv->tx_lock);
>> > +	netif_tx_lock_bh(priv->dev);
>> >  
>> >  	priv->xstats.tx_clean++;
>> >  
>> 
>> stmmac_tx_clean() runs from either the timer or the NAPI poll handler,
>> both execute from software interrupts, therefore _bh() should be
>> unnecessary.
> 
> I've tried the test again with netif_tx_lock() (not _bh()) and it
> survived for more then four hours. Strange...

It's not strange, it's completely expected.

  reply	other threads:[~2016-12-08 15:26 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-07 20:05 Remove private locks to avoid possible deadlock Lino Sanfilippo
2016-12-07 20:05 ` [PATCH 1/2] net: ethernet: sxgbe: remove private tx queue lock Lino Sanfilippo
2016-12-07 23:15   ` Francois Romieu
2016-12-08 20:32     ` Lino Sanfilippo
2016-12-08 21:54       ` Pavel Machek
2016-12-08 22:12         ` Lino Sanfilippo
2016-12-08 22:18           ` Pavel Machek
2016-12-08 22:45             ` Lino Sanfilippo
2016-12-08 23:19       ` Francois Romieu
2016-12-09 11:21         ` Pavel Machek
2016-12-10  2:25           ` Lino Sanfilippo
2016-12-11 20:11             ` Pavel Machek
2016-12-15 19:27               ` Lino Sanfilippo
2016-12-15 21:03                 ` Pavel Machek
2016-12-15 21:32                   ` Lino Sanfilippo
2016-12-15 22:33                     ` Lino Sanfilippo
2016-12-17 17:31                       ` Pavel Machek
2016-12-18  0:15                         ` Francois Romieu
2016-12-18 16:15                           ` Lino Sanfilippo
2016-12-18 17:23                             ` Pavel Machek
2016-12-18 18:30                             ` Pavel Machek
2016-12-19 22:49                               ` Lino Sanfilippo
2016-12-18 20:16                             ` Pavel Machek
2016-12-19 10:02                           ` Pavel Machek
2016-12-20  0:05                             ` Francois Romieu
2016-12-07 20:05 ` [PATCH 2/2] net: ethernet: stmmac: " Lino Sanfilippo
2016-12-07 20:55   ` Pavel Machek
2016-12-07 20:59   ` Pavel Machek
2016-12-07 21:37   ` Pavel Machek
2016-12-07 21:43     ` Lino Sanfilippo
2016-12-07 22:34       ` Lino Sanfilippo
2016-12-07 23:21         ` Pavel Machek
2016-12-07 23:41     ` David Miller
2016-12-08 14:08       ` Pavel Machek
2016-12-08 15:26         ` David Miller [this message]
2016-12-08 15:46           ` Pavel Machek

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=20161208.102641.2159772626439340664.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=LinoSanfilippo@gmx.de \
    --cc=alexandre.torgue@st.com \
    --cc=bh74.an@samsung.com \
    --cc=ks.giri@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=peppe.cavallaro@st.com \
    --cc=vipul.pandya@samsung.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).