[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4AA8E2FB.3040809@trash.net>
Date: Thu, 10 Sep 2009 13:28:59 +0200
From: Patrick McHardy <kaber@...sh.net>
To: Jarek Poplawski <jarkao2@...il.com>
CC: Eric Dumazet <eric.dumazet@...il.com>, netdev@...r.kernel.org
Subject: Re: net_sched 07/07: add classful multiqueue dummy scheduler
Jarek Poplawski wrote:
> On Wed, Sep 09, 2009 at 06:02:59PM +0200, Patrick McHardy wrote:
>>>>>>> + for (ntx = 0; ntx < dev->num_tx_queues; ntx++) {
>>>>>>> + qdisc = netdev_get_tx_queue(dev, ntx)->qdisc_sleeping;
>>>>>>> + spin_lock_bh(qdisc_lock(qdisc));
>>>>>>> + sch->q.qlen += qdisc->q.qlen;
>>>>>>> + sch->bstats.bytes += qdisc->bstats.bytes;
>>>>>>> + sch->bstats.packets += qdisc->bstats.packets;
>>>>>>> + sch->qstats.qlen += qdisc->qstats.qlen;
>>>>>> Like in Christoph's case, we should probably use q.qlen instead.
>>>>> Its done a few lines above. This simply sums up all members of qstats.
>>>> AFAICS these members are updated only in tc_fill_qdisc, starting from
>>>> the root, so they might be not up-to-date at the moment, unless I miss
>>>> something.
>>> Yes, we might need an q->ops->update_stats(struct Qdisc *sch) method, and
>>> to recursively call it from mq_update_stats()
>> Unless I'm missing something, that shouldn't be necessary since
>> sch->q.qlen contains the correct sum of all child qdiscs and
>> this is used by tc_fill_qdisc to update qstats.qlen.
>
> You're perfectly right! (And the code is perfectly misleading.;-)
I'll remove the misleading (and unnecessary) line of code, thanks Jarek.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists