netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: bhutchings@solarflare.com
Cc: peppe.cavallaro@st.com, netdev@vger.kernel.org
Subject: Re: [net-next.git 3/8 (V2)] stmmac: add the initial tx coalesce schema
Date: Thu, 13 Sep 2012 16:46:45 -0400 (EDT)	[thread overview]
Message-ID: <20120913.164645.1268091771093604148.davem@davemloft.net> (raw)
In-Reply-To: <1347568971.13258.19.camel@deadeye.wl.decadent.org.uk>

From: Ben Hutchings <bhutchings@solarflare.com>
Date: Thu, 13 Sep 2012 21:42:51 +0100

> On Thu, 2012-09-13 at 16:23 -0400, David Miller wrote:
>> From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
>> Date: Tue, 11 Sep 2012 08:55:09 +0200
>> 
>> > +	unsigned long flags;
>> > +
>> > +	spin_lock_irqsave(&priv->tx_lock, flags);
>> >  
>> > -	spin_lock(&priv->tx_lock);
>> > +	priv->xstats.tx_clean++;
>> 
>> You are changing the locking here for the sake of the new timer.
>> 
>> But timers run in software interrupt context, so this change is
>> completely unnecessary since NAPI runs in software interrupt context
>> as well, and neither timers nor NAPI run in hardware interrupts
>> context.
> 
> NAPI pollers can be called by netpoll in hardware interrupt context, and
> this driver supports netpoll.

And the netpoll handler need to make amends to make sure that
hardware the environment expected by the software interrupt
code is preserved.

Well written NAPI drivers never need to disable hardware interrupts
in their ->poll() method and it's callers, neither should you.

I'm not considering your patches until you implement this properly.

  reply	other threads:[~2012-09-13 20:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-11  6:55 [net-next.git 0/8 (V4)] stmmac: remove dead code for STMMAC_TIMER and add new mitigation schema Giuseppe CAVALLARO
2012-09-11  6:55 ` [net-next.git 1/8] stmmac: remove dead code for TIMER Giuseppe CAVALLARO
2012-09-11  6:55 ` [net-next.git 2/8 (V2)] stmmac: manage tx clean out of rx_poll Giuseppe CAVALLARO
2012-09-11  6:55 ` [net-next.git 3/8 (V2)] stmmac: add the initial tx coalesce schema Giuseppe CAVALLARO
2012-09-13 20:23   ` David Miller
2012-09-13 20:42     ` Ben Hutchings
2012-09-13 20:46       ` David Miller [this message]
2012-09-13 21:10         ` Ben Hutchings
2012-09-13 21:37           ` David Miller
2012-09-13 23:11             ` Ben Hutchings
2012-09-14  7:36     ` Giuseppe CAVALLARO
2012-09-18  5:41       ` Giuseppe CAVALLARO
2012-10-04 10:06         ` Giuseppe CAVALLARO
2012-09-11  6:55 ` [net-next.git 4/8 (V3)] stmmac: add Rx watchdog support to mitigate the DMA irqs Giuseppe CAVALLARO
2012-09-11  6:55 ` [net-next.git 5/8 (V2)] stmmac: get/set coalesce parameters via ethtool Giuseppe CAVALLARO
2012-09-11 18:14   ` Ben Hutchings
2012-09-11  6:55 ` [net-next.git 6/8] stmmac: fix and review the rx irq path after adding new mitigation Giuseppe CAVALLARO
2012-09-11  6:55 ` [net-next.git 7/8] stmmac: update the doc with new IRQ mitigation Giuseppe CAVALLARO
2012-09-11  6:55 ` [net-next.git 8/8] stmmac: update the driver version to Sept_2012 Giuseppe CAVALLARO
  -- strict thread matches above, loose matches on Subject: below --
2012-09-10  7:38 [net-next.git 0/8 (V3)] stmmac: remove dead code for STMMAC_TIMER and add new mitigation schema Giuseppe CAVALLARO
2012-09-10  7:38 ` [net-next.git 3/8 (V2)] stmmac: add the initial tx coalesce schema 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=20120913.164645.1268091771093604148.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=bhutchings@solarflare.com \
    --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).