From: Jarek Poplawski <jarkao2@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: herbert@gondor.apana.org.au, netdev@vger.kernel.org
Subject: Re: [PATCH 1/2] pkt_sched: Fix gen_estimator locks
Date: Wed, 27 Aug 2008 11:09:39 +0000 [thread overview]
Message-ID: <20080827110938.GB7258@ff.dom.local> (raw)
In-Reply-To: <20080827.034723.73512507.davem@davemloft.net>
On Wed, Aug 27, 2008 at 03:47:23AM -0700, David Miller wrote:
> From: Jarek Poplawski <jarkao2@gmail.com>
> Date: Wed, 27 Aug 2008 10:44:58 +0000
>
> > Yes, it should be simpler. (We can probably consider a pointer to
> > itself instead of NULL for root qdiscs, to skip testing for NULL e.g.
> > while getting a lock.) On the other hand, we lose with this the
> > possibility to easily determine which dev_queue is "the owner" of the
> > qdisc, or if some dev_queue contains a clone only.
>
> For root qdiscs we can add a TCQ_F_SHARED flag for this purpose.
Yes, but we can't do something like this:
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index e7fb9e0..a7f508c 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -235,6 +235,9 @@ struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle)
struct netdev_queue *txq = netdev_get_tx_queue(dev, i);
struct Qdisc *txq_root = txq->qdisc_sleeping;
+ /* skip the clones */
+ if (txq_root->dev_queue != txq)
+ continue;
q = qdisc_match_from_root(txq_root, handle);
if (q)
goto unlock;
Jarek P.
next prev parent reply other threads:[~2008-08-27 11:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-25 23:08 [PATCH 1/2] pkt_sched: Fix gen_estimator locks Jarek Poplawski
2008-08-26 12:57 ` Herbert Xu
2008-08-27 9:26 ` David Miller
2008-08-27 9:55 ` Herbert Xu
2008-08-27 9:57 ` David Miller
2008-08-27 10:44 ` Jarek Poplawski
2008-08-27 10:47 ` David Miller
2008-08-27 11:09 ` Jarek Poplawski [this message]
2008-08-27 11:15 ` David Miller
2008-08-27 11:22 ` Jarek Poplawski
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=20080827110938.GB7258@ff.dom.local \
--to=jarkao2@gmail.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--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).