<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/sched/sch_htb.c, branch linux-4.10.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.10.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.10.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-12-05T20:21:59Z</updated>
<entry>
<title>net_sched: gen_estimator: complete rewrite of rate estimators</title>
<updated>2016-12-05T20:21:59Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2016-12-04T17:48:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1c0d32fde5bdf1184bc274f864c09799278a1114'/>
<id>urn:sha1:1c0d32fde5bdf1184bc274f864c09799278a1114</id>
<content type='text'>
1) Old code was hard to maintain, due to complex lock chains.
   (We probably will be able to remove some kfree_rcu() in callers)

2) Using a single timer to update all estimators does not scale.

3) Code was buggy on 32bit kernel (WRITE_ONCE() on 64bit quantity
   is not supposed to work well)

In this rewrite :

- I removed the RB tree that had to be scanned in
  gen_estimator_active(). qdisc dumps should be much faster.

- Each estimator has its own timer.

- Estimations are maintained in net_rate_estimator structure,
  instead of dirtying the qdisc. Minor, but part of the simplification.

- Reading the estimator uses RCU and a seqcount to provide proper
  support for 32bit kernels.

- We reduce memory need when estimators are not used, since
  we store a pointer, instead of the bytes/packets counters.

- xt_rateest_mt() no longer has to grab a spinlock.
  (In the future, xt_rateest_tg() could be switched to per cpu counters)

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sch_htb: do not report fake rate estimators</title>
<updated>2016-10-26T21:13:49Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2016-10-21T16:02:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=73e42ff72a86e930dd873f47ea3029dc53f82c25'/>
<id>urn:sha1:73e42ff72a86e930dd873f47ea3029dc53f82c25</id>
<content type='text'>
When I prepared commit d250a5f90e53 ("pkt_sched: gen_estimator: Dont
report fake rate estimators"), htb still had an implicit rate estimator
for all its classes.

Then later, I made this rate estimator optional in commit 64153ce0a7b6
("net_sched: htb: do not setup default rate estimators"), but I forgot
to update htb use of gnet_stats_copy_rate_est()

After this patch, "tc -s qdisc ..." no longer report fake rate
estimators for HTB classes.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sched: add and use qdisc_skb_head helpers</title>
<updated>2016-09-19T05:47:18Z</updated>
<author>
<name>Florian Westphal</name>
</author>
<published>2016-09-17T22:57:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=48da34b7a74201f15315cb1fc40bb9a7bd2b4940'/>
<id>urn:sha1:48da34b7a74201f15315cb1fc40bb9a7bd2b4940</id>
<content type='text'>
This change replaces sk_buff_head struct in Qdiscs with new qdisc_skb_head.

Its similar to the skb_buff_head api, but does not use skb-&gt;prev pointers.

Qdiscs will commonly enqueue at the tail of a list and dequeue at head.
While skb_buff_head works fine for this, enqueue/dequeue needs to also
adjust the prev pointer of next element.

The -&gt;prev pointer is not required for qdiscs so we can just leave
it undefined and avoid one cacheline write access for en/dequeue.

Suggested-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2016-07-24T04:53:32Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2016-07-23T23:31:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=de0ba9a0d8909996f9e293d311c2cc459fa77d67'/>
<id>urn:sha1:de0ba9a0d8909996f9e293d311c2cc459fa77d67</id>
<content type='text'>
Just several instances of overlapping changes.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/sched/sch_htb: clamp xstats tokens to fit into 32-bit int</title>
<updated>2016-07-19T05:44:31Z</updated>
<author>
<name>Konstantin Khlebnikov</name>
</author>
<published>2016-07-16T14:08:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0564bf0afae443deeb16f36e2c39fefff89d05f2'/>
<id>urn:sha1:0564bf0afae443deeb16f36e2c39fefff89d05f2</id>
<content type='text'>
In kernel HTB keeps tokens in signed 64-bit in nanoseconds. In netlink
protocol these values are converted into pshed ticks (64ns for now) and
truncated to 32-bit. In struct tc_htb_xstats fields "tokens" and "ctokens"
are declared as unsigned 32-bit but they could be negative thus tool 'tc'
prints them as signed. Big values loose higher bits and/or become negative.

This patch clamps tokens in xstat into range from INT_MIN to INT_MAX.
In this way it's easier to understand what's going on here.

Signed-off-by: Konstantin Khlebnikov &lt;khlebnikov@yandex-team.ru&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2016-06-30T09:03:36Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2016-06-30T09:03:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ee58b57100ca953da7320c285315a95db2f7053d'/>
<id>urn:sha1:ee58b57100ca953da7320c285315a95db2f7053d</id>
<content type='text'>
Several cases of overlapping changes, except the packet scheduler
conflicts which deal with the addition of the free list parameter
to qdisc_enqueue().

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net_sched: sch_htb: export class backlog in dumps</title>
<updated>2016-06-25T16:19:35Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2016-06-22T06:16:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=338ed9b4de57c4b7965b96364593e27de0d89582'/>
<id>urn:sha1:338ed9b4de57c4b7965b96364593e27de0d89582</id>
<content type='text'>
We already get child qdisc qlen, we also can get its backlog
so that class dumps can report it.

Also replace qstats by a single drop counter, but move it in
a separate cache line so that drops do not dirty useful cache lines.

Tested:

$ tc -s cl sh dev eth0
class htb 1:1 root leaf 3: prio 0 rate 1Gbit ceil 1Gbit burst 500000b cburst 500000b
 Sent 2183346912 bytes 9021815 pkt (dropped 2340774, overlimits 0 requeues 0)
 rate 1001Mbit 517543pps backlog 120758b 499p requeues 0
 lended: 9021770 borrowed: 0 giants: 0
 tokens: 9 ctokens: 9

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net_sched: drop packets after root qdisc lock is released</title>
<updated>2016-06-25T16:19:35Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2016-06-22T06:16:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=520ac30f45519b0a82dd92117c181d1d6144677b'/>
<id>urn:sha1:520ac30f45519b0a82dd92117c181d1d6144677b</id>
<content type='text'>
Qdisc performance suffers when packets are dropped at enqueue()
time because drops (kfree_skb()) are done while qdisc lock is held,
delaying a dequeue() draining the queue.

Nominal throughput can be reduced by 50 % when this happens,
at a time we would like the dequeue() to proceed as fast as possible.

Even FQ is vulnerable to this problem, while one of FQ goals was
to provide some flow isolation.

This patch adds a 'struct sk_buff **to_free' parameter to all
qdisc-&gt;enqueue(), and in qdisc_drop() helper.

I measured a performance increase of up to 12 %, but this patch
is a prereq so that future batches in enqueue() can fly.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Acked-by: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>htb: call qdisc_root with rcu read lock held</title>
<updated>2016-06-15T21:42:46Z</updated>
<author>
<name>Florian Westphal</name>
</author>
<published>2016-06-14T04:16:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0ee13627f963f9c5c9544ed19d82854836d5e676'/>
<id>urn:sha1:0ee13627f963f9c5c9544ed19d82854836d5e676</id>
<content type='text'>
saw a debug splat:
net/include/net/sch_generic.h:287 suspicious rcu_dereference_check() usage!
other info that might help us debug this:
rcu_scheduler_active = 1, debug_locks = 0
 2 locks held by kworker/2:1/710:
  #0:  ("events"){.+.+.+}, at: [&lt;ffffffff8106ca1d&gt;]
  #1:  ((&amp;q-&gt;work)){+.+...}, at: [&lt;ffffffff8106ca1d&gt;] process_one_work+0x14d/0x690
Workqueue: events htb_work_func
Call Trace:
 [&lt;ffffffff812dc763&gt;] dump_stack+0x85/0xc2
 [&lt;ffffffff8109fee7&gt;] lockdep_rcu_suspicious+0xe7/0x120
 [&lt;ffffffff814ced47&gt;] htb_work_func+0x67/0x70

Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Acked-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net_sched: sch_htb: defer skb freeing</title>
<updated>2016-06-15T21:08:35Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2016-06-14T03:21:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a5a9f5346fb95c00d47e8b4648f6d5eada147cd4'/>
<id>urn:sha1:a5a9f5346fb95c00d47e8b4648f6d5eada147cd4</id>
<content type='text'>
Both htb_reset() and htb_destroy() can use __qdisc_reset_queue()
instead of __skb_queue_purge() to defer skb freeing of internal
queues.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
