Historic archive of defunct list bloat-devel@lists.bufferbloat.net
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: bloat-devel@lists.bufferbloat.net
Subject: [PATCH RFC 0/3] Broadcasting qdisc statistics via netlink
Date: Mon, 10 Jun 2013 14:39:46 +0200	[thread overview]
Message-ID: <1370867989-7318-1-git-send-email-toke@toke.dk> (raw)

These patches are my attempt to implement periodical broadcast of qdisc
statistics via netlink. The goal is to be able to monitor qdisc stats
without having to poll (as tc does).

What it does:

- On packet dequeue, broadcast a netlink multicast packet with the qdisc
  statistics. There's a sysctl parameter that sets the minimum interval
  between two consecutive broadcasts. The broadcast is done while the
  qdisc lock is still held (I think), so no new locking is done.

- Right now the only new statistics being gathered is that I added qlen
  statistics to pfifo_fast (since they were missing), but otherwise it's
  basically what tc gets on `tc -s qdisc`. Oh, and the rate estimation
  is missing, because it complained about locking.


I'm hoping some of you can comment on the usefulness of this approach,
and point out to me where I'm doing things wrong. It's working to the
point where there is some output, but not quite the way I've envisioned
(there's certainly not a netlink packet broadcast for each packet
dequeued).

Anyway, the patches follow (they're against Linux 3.9.4). There's a
client at https://github.com/tohojo/netlink-client which requires libnl
and cmake to build; run it as `./netlink-client -i <iface>` and it'll
print what it receives from the kernel for 60 seconds (set duration with
-l).

Thanks,
-Toke

Toke Høiland-Jørgensen (3):
  Broadcast qdisc statistics via netlink on packet dequeue.
  Add qdisc_stats_broadcast_interval sysctl parameter, and use it to
    limit     stats broadcast interval.
  Make pfifo_fast track qlen stats.

 include/net/netns/ipv4.h       |  4 ++
 include/net/sch_generic.h      |  4 ++
 include/uapi/linux/rtnetlink.h | 15 ++++---
 net/core/gen_stats.c           |  6 ++-
 net/ipv4/sysctl_net_ipv4.c     | 13 ++++++
 net/sched/Kconfig              |  8 ++++
 net/sched/sch_api.c            |  7 ++++
 net/sched/sch_generic.c        | 93 ++++++++++++++++++++++++++++++++++++++++++
 8 files changed, 143 insertions(+), 7 deletions(-)

-- 
1.8.3


             reply	other threads:[~2013-06-10 12:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-10 12:39 Toke Høiland-Jørgensen [this message]
2013-06-10 12:39 ` [PATCH RFC 1/3] Broadcast qdisc statistics via netlink on packet dequeue Toke Høiland-Jørgensen
2013-06-10 17:20   ` Dave Taht
2013-06-11  7:15     ` Toke Høiland-Jørgensen
2013-06-10 12:39 ` [PATCH RFC 2/3] Add qdisc_stats_broadcast_interval sysctl parameter, and use it to limit stats broadcast interval Toke Høiland-Jørgensen
2013-06-10 12:39 ` [PATCH RFC 3/3] Make pfifo_fast track qlen stats Toke Høiland-Jørgensen
2013-06-17 19:07 ` [RFC PATCH v2] Broadcast qdisc statistics via netlink on packet dequeue Toke Høiland-Jørgensen

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=1370867989-7318-1-git-send-email-toke@toke.dk \
    --to=toke@toke.dk \
    --cc=bloat-devel@lists.bufferbloat.net \
    /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