From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: David Miller <davem@davemloft.net>,
paulus@samba.org, netdev@vger.kernel.org
Subject: Re: [STRAW MAN PATCH] sch_teql doesn't load-balance ppp(oatm) slaves
Date: Tue, 27 Mar 2012 21:55:38 +0200 [thread overview]
Message-ID: <1332878138.3547.41.camel@edumazet-glaptop> (raw)
In-Reply-To: <1332875447.2058.48.camel@shinybook.infradead.org>
On Tue, 2012-03-27 at 20:10 +0100, David Woodhouse wrote:
> On Sun, 2012-03-25 at 17:36 -0400, David Miller wrote:
> > Yes, the ATM devices deep transmit queue is quite undesirable.
>
> This should fix that, and while I'm at it should fix the gratuitous
> running of ppp_output_wakeup() from a tasklet on *every* packet, when
> it's almost never necessary. Some careful eyes over the locking issues
> on that would be much appreciated. I've documented how I *think* it
> works...
>
> I'm tempted to rip out the atm_may_send() bit; there's not a lot of
> point in checking against sk_sndbuf when we're limiting to two packets
> anyway, is there? There's always been a problem here if sk_sndbuf was
> set lower than the MTU of the interface; it would block for ever.
>
> I'm running this now on my ADSL router. I can watch it working, keeping
> precisely two packets in the queue at a time (one really in-flight and
> one ready for the ATM driver). My leftover debugging in sch_teql is
> triggering when the xmit returns NETDEV_TX_BUSY, and all seems to be
> well.
>
> --- net/atm/pppoatm.c~ 2012-03-27 19:59:54.379565896 +0100
> +++ net/atm/pppoatm.c 2012-03-27 20:03:02.676561017 +0100
> @@ -62,10 +62,13 @@ struct pppoatm_vcc {
> void (*old_pop)(struct atm_vcc *, struct sk_buff *);
> /* keep old push/pop for detaching */
> enum pppoatm_encaps encaps;
> + atomic_t inflight;
> + unsigned long blocked;
> int flags; /* SC_COMP_PROT - compress protocol */
> struct ppp_channel chan; /* interface to generic ppp layer */
> struct tasklet_struct wakeup_tasklet;
> };
> +#define BLOCKED 0
>
> /*
> * Header used for LLC Encapsulated PPP (4 bytes) followed by the LCP protocol
> @@ -102,16 +105,31 @@ static void pppoatm_wakeup_sender(unsign
> static void pppoatm_pop(struct atm_vcc *atmvcc, struct sk_buff *skb)
> {
> struct pppoatm_vcc *pvcc = atmvcc_to_pvcc(atmvcc);
> +
> pvcc->old_pop(atmvcc, skb);
> + smp_mb__before_atomic_dec();
I have no idea why you added all these barriers...
> + atomic_dec(&pvcc->inflight);
> +
> /*
next prev parent reply other threads:[~2012-03-27 19:55 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
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 [this message]
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=1332878138.3547.41.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=dwmw2@infradead.org \
--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