netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: David Miller <davem@davemloft.net>
Cc: paulus@samba.org, netdev@vger.kernel.org
Subject: Re: [PATCH] ppp: Don't stop and restart queue on every TX packet
Date: Sun, 08 Apr 2012 21:58:24 +0200	[thread overview]
Message-ID: <1333915104.31812.61.camel@shinybook.infradead.org> (raw)
In-Reply-To: <20120403.172958.144419545310336164.davem@davemloft.net>

[-- Attachment #1: Type: text/plain, Size: 1702 bytes --]

On Tue, 2012-04-03 at 17:29 -0400, David Miller wrote:
> From: David Woodhouse <dwmw2@infradead.org>
> Date: Mon, 26 Mar 2012 11:03:42 +0100
> 
> > For every transmitted packet, ppp_start_xmit() will stop the netdev
> > queue and then, if appropriate, restart it. This causes the TX softirq
> > to run, entirely gratuitously.
> > 
> > This is "only" a waste of CPU time in the normal case, but it's actively
> > harmful when the PPP device is a TEQL slave ― the wakeup will cause the
> > offending device to receive the next TX packet from the TEQL queue, when
> > it *should* have gone to the next slave in the list. We end up seeing
> > large bursts of packets on just *one* slave device, rather than using
> > the full available bandwidth over all slaves.
> > 
> > This patch fixes the problem by *not* unconditionally stopping the queue
> > in ppp_start_xmit(). It adds a return value from ppp_xmit_process()
> > which indicates whether the queue should be stopped or not.
> > 
> > It *doesn't* remove the call to netif_wake_queue() from
> > ppp_xmit_process(), because other code paths (especially from
> > ppp_output_wakeup()) need it there and it's messy to push it out to the
> > other callers to do it based on the return value. So we leave it in
> > place ― it's a no-op in the case where the queue wasn't stopped, so it's
> > harmless in the TX path.
> > 
> > Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
> 
> Applied, thanks. 

Hmm. After going through the locking issues on wakeup, for the PPPoATM
patch I just sent, I think that the above has introduced a bug. I'll
send a patch with a full explanation in a few moments...

-- 
dwmw2

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5818 bytes --]

  reply	other threads:[~2012-04-08 19:58 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-22 21:03 [STRAW MAN PATCH] sch_teql doesn't load-balance ppp(oatm) slaves David Woodhouse
2012-03-23  3:03 ` David Miller
2012-03-25 10:43   ` David Woodhouse
2012-03-25 21:36     ` David Miller
2012-03-26  8:32       ` David Woodhouse
2012-03-26  9:45         ` David Woodhouse
2012-03-26 10:03       ` [PATCH] ppp: Don't stop and restart queue on every TX packet David Woodhouse
2012-04-03 21:29         ` David Miller
2012-04-08 19:58           ` David Woodhouse [this message]
2012-04-08 20:01             ` ppp: Fix race condition with queue start/stop David Woodhouse
2012-04-13 17:07               ` David Miller
2012-03-27 19:10       ` [STRAW MAN PATCH] sch_teql doesn't load-balance ppp(oatm) slaves David Woodhouse
2012-03-27 19:55         ` Eric Dumazet
2012-03-27 20:35           ` David Woodhouse
2012-04-08 19:53             ` [PATCH] pppoatm: Fix excessive queue bloat David Woodhouse
2012-04-10 14:26               ` chas williams - CONTRACTOR
2012-04-10 20:28                 ` David Woodhouse
2012-04-13 17:04                 ` David Miller
2012-04-13 17:27                   ` David Miller
2012-04-13 17:05               ` David Miller
2012-04-08 19:55             ` David Woodhouse

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=1333915104.31812.61.camel@shinybook.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=paulus@samba.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).