Historic archive of defunct list bloat-devel@lists.bufferbloat.net
 help / color / mirror / Atom feed
* [PATCH RFC 0/3] Broadcasting qdisc statistics via netlink
@ 2013-06-10 12:39 Toke Høiland-Jørgensen
  2013-06-10 12:39 ` [PATCH RFC 1/3] Broadcast qdisc statistics via netlink on packet dequeue Toke Høiland-Jørgensen
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Toke Høiland-Jørgensen @ 2013-06-10 12:39 UTC (permalink / raw)
  To: bloat-devel

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-06-17 19:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-10 12:39 [PATCH RFC 0/3] Broadcasting qdisc statistics via netlink Toke Høiland-Jørgensen
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox