netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jamal <hadi@cyberus.ca>
To: "Waskiewicz Jr, Peter P" <peter.p.waskiewicz.jr@intel.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org
Subject: RE: [RFC] make qdisc_restart more readable
Date: Fri, 11 May 2007 14:35:59 -0400	[thread overview]
Message-ID: <1178908559.4126.19.camel@localhost> (raw)
In-Reply-To: <D5C1322C3E673F459512FB59E0DDC32902D424F4@orsmsx414.amr.corp.intel.com>

On Fri, 2007-11-05 at 11:13 -0700, Waskiewicz Jr, Peter P wrote:

> After thinking about this a bit more: even if the queue is stopped,
> you'd end up requeueing anyways.  Plus, you'd need to re-acquire
> dev->queue_lock (which is what happens today).  I think the best way
> overall would be to check the queue state before you physically dequeue
> (whether it's in qdisc_restart() or in the qdisc's ->dequeue()).

For lockless drivers, I think it could be moved up; only thing is
nothing is stopping it from changing again at transmit time.
For drivers that are not lockless, i am wondering if its even useful
to have that check given we have already grabbed the tx lock.

>   That
> way you still hold dev->queue_lock in case the queue is stopped, and
> haven't yet pulled an skb causing a requeue event.

It certainly sounds like a useful optimization. Defer that thought - for
now i just want to make sure its doing what the previous code did.

I will repost the fixed patch later today after some testing; if you
have time i will appreciate some eyeballing. That piece of code is
hairy. Hopefully we can make it bald.

cheers,
jamal



  reply	other threads:[~2007-05-11 18:36 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-11  0:13 [RFC] make qdisc_restart more readable jamal
2007-05-11 15:56 ` Waskiewicz Jr, Peter P
2007-05-11 18:04   ` jamal
2007-05-11 18:13     ` Waskiewicz Jr, Peter P
2007-05-11 18:35       ` jamal [this message]
2007-05-11 18:46         ` Waskiewicz Jr, Peter P
2007-05-11 19:29           ` take 2 WAS (RE: " jamal
2007-05-11 22:01             ` Waskiewicz Jr, Peter P
2007-05-11 22:43               ` jamal
2007-05-12  9:46             ` Thomas Graf
2007-05-12 11:58               ` jamal
2007-05-12 12:18             ` take 3 " jamal
2007-05-12 17:02               ` Patrick McHardy
2007-05-12 19:56                 ` jamal
2007-05-13 14:28                   ` [LAST CALL] [PATCH] [NET_SCHED]make " jamal
2007-05-14 10:40                     ` Patrick McHardy
2007-05-14 12:41                       ` jamal
2007-05-14 12:43                         ` Patrick McHardy
2007-05-14 13:30                     ` jamal
2007-05-14 20:09                       ` Waskiewicz Jr, Peter P
2007-05-16 22:55                       ` jamal
2007-05-16 23:00                         ` David Miller
2007-05-16 23:15                         ` Sridhar Samudrala
2007-05-17  2:12                           ` jamal
2007-05-11 17:01 ` [RFC] make " Thomas Graf
2007-05-11 18:11   ` jamal

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=1178908559.4126.19.camel@localhost \
    --to=hadi@cyberus.ca \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@vger.kernel.org \
    --cc=peter.p.waskiewicz.jr@intel.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).