From: Patrick McHardy <kaber@trash.net>
To: Jarek Poplawski <jarkao2@gmail.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
Christoph Lameter <cl@linux-foundation.org>,
David Miller <davem@davemloft.net>,
netdev@vger.kernel.org
Subject: Re: [NET] Add proc file to display the state of all qdiscs.
Date: Wed, 02 Sep 2009 14:44:49 +0200 [thread overview]
Message-ID: <4A9E68C1.5050407@trash.net> (raw)
In-Reply-To: <20090902093710.GA7097@ff.dom.local>
Jarek Poplawski wrote:
> On Wed, Sep 02, 2009 at 09:33:29AM +0000, Jarek Poplawski wrote:
>> On Wed, Sep 02, 2009 at 09:18:54AM +0000, Jarek Poplawski wrote:
>>> On Wed, Sep 02, 2009 at 10:28:55AM +0200, Eric Dumazet wrote:
>> ...
>>>> qdisc pfifo_fast 0: dev eth0 root bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
>>>> Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
>>>> rate 0bit 0pps backlog 0b 0p requeues 0
>>>>
>>>>
>>>> Same name "eth0" is displayed, that might confuse parsers...
>>>>
>>>> What naming convention should we choose for multiqueue devices ?
>>>>
>>> Hmm... anything could break here something for somebody, so there is
>>> still a (Patrick's) question if not sum it all? Otherwise, I wonder
>>> about using the qdisc handle (tcm_handle>>16): there would be at
>>> least one "pfifo_fast 0:" looking like proper root for somebody...
>> I meant "proper" for pfifo_fast. On the other hand, I wonder why these
>> multiqueue qdisc handles can't be really given such unique per dev
>
> should be:
> multiqueue qdiscs can't be really given such unique per dev
>
>> (instead of per queue) handles?
In my opinion the best way would be to sum up the stats and display
them for the "main" qdisc to avoid any compatibility problems and
additionally dump each queue for informational purposes.
This raises a few more questions however. First of all, there's no
"main" qdisc, so if we just use the first one for the summed up stats,
the question is whether the parameters of all root qdiscs are the same.
Currently they should be since pfifo_fast doesn't support changing
parameters, but this might change in the future, in which case we
might be displaying "incorrect" parameters.
The next question would be whether and how to support changing
parameters of individual multiq qdiscs. Similar to dumps, when
changing qdisc parameters we always pick queue number 0. It we want
to support changing parameters of different queues, we could
replicate changes to all queues, which would avoid the problem
stated above, or we could add an optional identifier for the
queue number, or we could use a combination of both which only
replicates settings when no queue number is specified.
In the second and third case, one possibility to get around the
incorrect parameters for the "main" qdisc would be to display
a virtual (non-existant) qdisc as the root, which only contains
the stats. I don't think the default choice of root qdisc type
should be counted as belonging to the API and userspace should
be prepared to deal with this.
And finally, the TC API used to be symetrical in the sense that
you could replay a dump to the kernel to get the same configuration.
Dumping the individual queues would break that property unless
we also support creating and configuring them in a symetrical
fashion.
So here's something of a possible solution, assuming that at some
point we do want to support changing parameters for individual root
qdiscs and taking the above into account:
- when creating a qdisc on a multiqueue-device through the TC
API, we keep the current behaviour and share it between all
queues. Configuration changes don't need to be replicated since
the qdisc is shared. Dumps only contain a single instance of
the qdisc. This is exactly what is done today.
- for non-shared root qdiscs on a multiqueue device like the
pfifo_fast qdiscs created by default, we dump a virtual root
qdisc (multiqueue) which only contains the number of bands
and the statistics and dump the real root qdiscs as children
of that qdisc.
- to create or configure a qdisc for a specific queue number, we
require the user to create the virtual root qdisc (which only
sets a flag or something like that) and then address each queue
number. When the virtual qdisc has been created, we don't
replicate any changes. This restores symetry with dumps and
allows to address individual queues.
This is just a first collection of thoughts and probably can be
improved. Comments welcome :)
next prev parent reply other threads:[~2009-09-02 12:44 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-01 23:52 [NET] Add proc file to display the state of all qdiscs Christoph Lameter
2009-09-02 8:14 ` Jarek Poplawski
2009-09-02 8:28 ` Eric Dumazet
2009-09-02 8:30 ` David Miller
2009-09-02 12:30 ` [PATCH net-next-2.6] tc: report informations for multiqueue devices Eric Dumazet
2009-09-02 12:48 ` Eric Dumazet
2009-09-02 16:23 ` Stephen Hemminger
2009-09-02 16:30 ` Patrick McHardy
2009-09-02 16:50 ` Eric Dumazet
2009-09-02 17:17 ` [PATCH net-next-2.6] vlan: multiqueue vlan devices Eric Dumazet
2009-09-02 17:49 ` Patrick McHardy
2009-09-02 18:37 ` Brian Haley
2009-09-02 18:55 ` Eric Dumazet
2009-09-02 19:01 ` Stephen Hemminger
2009-09-02 19:12 ` Eric Dumazet
2009-09-03 1:04 ` David Miller
2009-09-03 1:05 ` Eric Dumazet
2009-09-03 9:17 ` Eric Dumazet
2009-09-03 9:20 ` David Miller
2009-09-02 17:31 ` [PATCH net-next-2.6] tc: report informations for multiqueue devices Eric Dumazet
2009-09-02 17:50 ` Patrick McHardy
2009-09-02 13:18 ` Patrick McHardy
2009-09-02 13:49 ` Eric Dumazet
2009-09-02 14:07 ` Patrick McHardy
2009-09-02 22:17 ` Jarek Poplawski
2009-09-02 9:18 ` [NET] Add proc file to display the state of all qdiscs Jarek Poplawski
2009-09-02 9:33 ` Jarek Poplawski
2009-09-02 9:37 ` Jarek Poplawski
2009-09-02 12:44 ` Patrick McHardy [this message]
2009-09-02 18:13 ` Christoph Lameter
2009-09-03 14:19 ` Jesper Dangaard Brouer
2009-09-03 14:29 ` Patrick McHardy
2009-09-03 14:43 ` Eric Dumazet
2009-09-03 17:30 ` Jesper Dangaard Brouer
2009-09-03 17:56 ` Patrick McHardy
2009-09-03 23:31 ` David Miller
2009-09-04 1:36 ` Patrick McHardy
2009-09-04 1:43 ` Patrick McHardy
2009-09-03 23:28 ` David Miller
2009-09-03 23:22 ` David Miller
2009-09-02 18:12 ` Christoph Lameter
2009-09-02 19:49 ` Jarek Poplawski
2009-09-02 21:27 ` Jarek Poplawski
2009-09-03 18:03 ` Christoph Lameter
2009-09-03 19:35 ` Jarek Poplawski
2009-09-03 19:38 ` Eric Dumazet
2009-09-03 19:54 ` Jarek Poplawski
[not found] <20090902080921.GA4878@ff.dom.local>
2009-09-02 18:11 ` Christoph Lameter
2009-09-02 19:33 ` 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=4A9E68C1.5050407@trash.net \
--to=kaber@trash.net \
--cc=cl@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=jarkao2@gmail.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).