From: jamal <hadi@cyberus.ca>
To: David Miller <davem@davemloft.net>
Cc: herbert@gondor.apana.org.au, krkumar2@in.ibm.com, netdev@vger.kernel.org
Subject: Re: [PATCH] sched: Optimize return value of qdisc_restart
Date: Thu, 10 May 2007 08:21:01 -0400 [thread overview]
Message-ID: <1178799661.4074.20.camel@localhost> (raw)
In-Reply-To: <20070510.045534.90119358.davem@davemloft.net>
On Thu, 2007-10-05 at 04:55 -0700, David Miller wrote:
> From: Herbert Xu <herbert@gondor.apana.org.au>
> Date: Thu, 10 May 2007 21:50:39 +1000
>
> T_SCHED]: Rationalise return value of qdisc_restart
> >
> > The current return value scheme and associated comment was invented
> > back in the 20th century when we still had that tbusy flag. Things
> > have changed quite a bit since then (even Tony Blair is moving on
> > now, not to mention the new French president).
> >
> > All we need to indicate now is whether the caller should continue
> > processing the queue. Therefore it's sufficient if we return 0 if
> > we want to stop and non-zero otherwise.
> >
> > This is based on a patch by Krishna Kumar.
> >
> > Signed-off-by: <herbert@gondor.apana.org.au>
>
> Fair enough, patch applied :-)
Ok, see if this makes sense:
CPU0 CPU1 (holding qdisc running)
. |
. |
. + grab qlock
. |
. | deq pkt
. + release qlock
. + grab txlock
. | send pkt
. + release txlock
. + grab qlock
has pktX | (NEW: qlen = 0); return 0 instead of -1
waiting for qlock + release qlock
+ grab qlock |
| + find that return code is 0
| enq pkt X + release qdisc running
| |
+ release qlock | ==> outta here
pkt X is stuck unless some event happens such as a new pkt arrival.
In other words it sits there for an indeterminate period.
cheers,
jamal
next prev parent reply other threads:[~2007-05-10 12:21 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-08 7:31 [PATCH] sched: Optimize return value of qdisc_restart Krishna Kumar
2007-05-09 2:05 ` David Miller
2007-05-09 4:35 ` Krishna Kumar2
2007-05-09 6:36 ` David Miller
2007-05-09 7:23 ` Krishna Kumar2
2007-05-09 8:12 ` David Miller
2007-05-09 12:56 ` jamal
2007-05-09 14:47 ` Krishna Kumar2
2007-05-09 15:52 ` jamal
2007-05-10 5:12 ` Krishna Kumar2
2007-05-10 11:50 ` Herbert Xu
2007-05-10 11:55 ` David Miller
2007-05-10 12:10 ` Herbert Xu
2007-05-10 21:11 ` David Miller
2007-05-10 12:21 ` jamal [this message]
2007-05-10 12:50 ` jamal
2007-05-10 12:59 ` Herbert Xu
2007-05-10 13:18 ` jamal
2007-05-10 13:52 ` Herbert Xu
2007-05-10 14:12 ` jamal
2007-05-10 14:26 ` Krishna Kumar2
2007-05-10 14:31 ` Herbert Xu
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=1178799661.4074.20.camel@localhost \
--to=hadi@cyberus.ca \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=krkumar2@in.ibm.com \
--cc=netdev@vger.kernel.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).