<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/net/sch_generic.h, branch v4.9</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.9</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-09-19T05:47:18Z</updated>
<entry>
<title>sched: add and use qdisc_skb_head helpers</title>
<updated>2016-09-19T05:47:18Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2016-09-17T22:57:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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>sched: remove qdisc arg from __qdisc_dequeue_head</title>
<updated>2016-09-19T05:47:18Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2016-09-17T22:57:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ec323368793b8570c02e723127611a8d906a9b3f'/>
<id>urn:sha1:ec323368793b8570c02e723127611a8d906a9b3f</id>
<content type='text'>
Moves qdisc stat accouting to qdisc_dequeue_head.

The only direct caller of the __qdisc_dequeue_head version open-codes
this now.

This allows us to later use __qdisc_dequeue_head as a replacement
of __skb_dequeue() (which operates on sk_buff_head list).

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>net: minor optimization in qdisc_qstats_cpu_drop()</title>
<updated>2016-08-25T23:45:29Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2016-08-24T17:23:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=eb60a8ddf3c38959cc73821bec5335bed85e0200'/>
<id>urn:sha1:eb60a8ddf3c38959cc73821bec5335bed85e0200</id>
<content type='text'>
per_cpu_inc() is faster (at least on x86) than per_cpu_ptr(xxx)++;

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Acked-by: John Fastabend &lt;john.r.fastabend@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: sched: convert qdisc linked list to hashtable</title>
<updated>2016-08-11T00:19:02Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2016-08-10T09:05:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=59cc1f61f09c26ce82c308e24b76141e1efe99f8'/>
<id>urn:sha1:59cc1f61f09c26ce82c308e24b76141e1efe99f8</id>
<content type='text'>
Convert the per-device linked list into a hashtable. The primary
motivation for this change is that currently, we're not tracking all the
qdiscs in hierarchy (e.g. excluding default qdiscs), as the lookup
performed over the linked list by qdisc_match_from_root() is rather
expensive.

The ultimate goal is to get rid of hidden qdiscs completely, which will
bring much more determinism in user experience.

Reviewed-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net_sched: generalize bulk dequeue</title>
<updated>2016-06-25T16:19:35Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2016-06-22T06:16:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4d202a0d31b96ab3324b21e7500d9a2da9ef57dd'/>
<id>urn:sha1:4d202a0d31b96ab3324b21e7500d9a2da9ef57dd</id>
<content type='text'>
When qdisc bulk dequeue was added in linux-3.18 (commit
5772e9a3463b "qdisc: bulk dequeue support for qdiscs
with TCQ_F_ONETXQUEUE"), it was constrained to some
specific qdiscs.

With some extra care, we can extend this to all qdiscs,
so that typical traffic shaping solutions can benefit from
small batches (8 packets in this patch).

For example, HTB is often used on some multi queue device.
And bonding/team are multi queue devices...

Idea is to bulk-dequeue packets mapping to the same transmit queue.

This brings between 35 and 80 % performance increase in HTB setup
under pressure on a bonding setup :

1) NUMA node contention :   610,000 pps -&gt; 1,110,000 pps
2) No node contention   : 1,380,000 pps -&gt; 1,930,000 pps

Now we should work to add batches on the enqueue() side ;)

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: John Fastabend &lt;john.r.fastabend@intel.com&gt;
Cc: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Cc: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Cc: Florian Westphal &lt;fw@strlen.de&gt;
Cc: Daniel Borkmann &lt;daniel@iogearbox.net&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>net_sched: drop packets after root qdisc lock is released</title>
<updated>2016-06-25T16:19:35Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2016-06-22T06:16:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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>net_sched: add the ability to defer skb freeing</title>
<updated>2016-06-15T21:08:34Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2016-06-14T03:21:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1b5c5493e3e68181be344cb51bf9df192d05ffc2'/>
<id>urn:sha1:1b5c5493e3e68181be344cb51bf9df192d05ffc2</id>
<content type='text'>
qdisc are changed under RTNL protection and often
while blocking BH and root qdisc spinlock.

When lots of skbs need to be dropped, we free
them under these locks causing TX/RX freezes,
and more generally latency spikes.

This commit adds rtnl_kfree_skbs(), used to queue
skbs for deferred freeing.

Actual freeing happens right after RTNL is released,
with appropriate scheduling points.

rtnl_qdisc_drop() can also be used in place
of disc_drop() when RTNL is held.

qdisc_reset_queue() and __qdisc_reset_queue() get
the new behavior, so standard qdiscs like pfifo, pfifo_fast...
have their -&gt;reset() method automatically handled.

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: remove generic throttled management</title>
<updated>2016-06-11T06:58:21Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2016-06-10T23:41:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=45f50bed1d808794e514e9eed0e579a8756ce2ba'/>
<id>urn:sha1:45f50bed1d808794e514e9eed0e579a8756ce2ba</id>
<content type='text'>
__QDISC_STATE_THROTTLED bit manipulation is rather expensive
for HTB and few others.

I already removed it for sch_fq in commit f2600cf02b5b
("net: sched: avoid costly atomic operation in fq_dequeue()")
and so far nobody complained.

When one ore more packets are stuck in one or more throttled
HTB class, a htb dequeue() performs two atomic operations
to clear/set __QDISC_STATE_THROTTLED bit, while root qdisc
lock is held.

Removing this pair of atomic operations bring me a 8 % performance
increase on 200 TCP_RR tests, in presence of throttled classes.

This patch has no side effect, since nothing actually uses
disc_is_throttled() anymore.

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>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2016-06-10T18:52:24Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2016-06-10T18:52:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1578b0a5e92825334760741e5c166b8873886f1b'/>
<id>urn:sha1:1578b0a5e92825334760741e5c166b8873886f1b</id>
<content type='text'>
Conflicts:
	net/sched/act_police.c
	net/sched/sch_drr.c
	net/sched/sch_hfsc.c
	net/sched/sch_prio.c
	net/sched/sch_red.c
	net/sched/sch_tbf.c

In net-next the drop methods of the packet schedulers got removed, so
the bug fixes to them in 'net' are irrelevant.

A packet action unload crash fix conflicts with the addition of the
new firstuse timestamp.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: sched: fix qdisc-&gt;running lockdep annotations</title>
<updated>2016-06-09T20:28:37Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2016-06-09T14:45:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=52fbb2907988aa0583c6d9d53a56aee090b2df7e'/>
<id>urn:sha1:52fbb2907988aa0583c6d9d53a56aee090b2df7e</id>
<content type='text'>
1) qdisc_run_begin() is really using the equivalent of a trylock.
  Instead of using write_seqcount_begin(), use a combination of
  raw_write_seqcount_begin() and correct lockdep annotation.

2) sch_direct_xmit() should use regular spin_lock(root_lock)

Fixes: f9eb8aea2a1e ("net_sched: transform qdisc running bit into a seqcount")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: David Ahern &lt;dsa@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
