<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/sched/sch_generic.c, branch linux-3.8.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.8.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.8.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-12-12T05:16:47Z</updated>
<entry>
<title>pkt_sched: avoid requeues if possible</title>
<updated>2012-12-12T05:16:47Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2012-12-11T15:54:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1abbe1394a84c10919e32242318e715b04d7e33b'/>
<id>urn:sha1:1abbe1394a84c10919e32242318e715b04d7e33b</id>
<content type='text'>
With BQL being deployed, we can more likely have following behavior :

We dequeue a packet from qdisc in dequeue_skb(), then we realize target
tx queue is in XOFF state in sch_direct_xmit(), and we have to hold the
skb into gso_skb for later.

This shows in stats (tc -s qdisc dev eth0) as requeues.

Problem of these requeues is that high priority packets can not be
dequeued as long as this (possibly low prio and big TSO packet) is not
removed from gso_skb.

At 1Gbps speed, a full size TSO packet is 500 us of extra latency.

In some cases, we know that all packets dequeued from a qdisc are
for a particular and known txq :

- If device is non multi queue
- For all MQ/MQPRIO slave qdiscs

This patch introduces a new qdisc flag, TCQ_F_ONETXQUEUE to mark
this capability, so that dequeue_skb() is allowed to dequeue a packet
only if the associated txq is not stopped.

This indeed reduce latencies for high prio packets (or improve fairness
with sfq/fq_codel), and almost remove qdisc 'requeues'.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Cc: 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: qdisc busylock needs lockdep annotations</title>
<updated>2012-09-05T21:49:27Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2012-09-05T01:02:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=23d3b8bfb8eb20e7d96afa09991e6a5ed1c83164'/>
<id>urn:sha1:23d3b8bfb8eb20e7d96afa09991e6a5ed1c83164</id>
<content type='text'>
It seems we need to provide ability for stacked devices
to use specific lock_class_key for sch-&gt;busylock

We could instead default l2tpeth tx_queue_len to 0 (no qdisc), but
a user might use a qdisc anyway.

(So same fixes are probably needed on non LLTX stacked drivers)

Noticed while stressing L2TPV3 setup :

======================================================
 [ INFO: possible circular locking dependency detected ]
 3.6.0-rc3+ #788 Not tainted
 -------------------------------------------------------
 netperf/4660 is trying to acquire lock:
  (l2tpsock){+.-...}, at: [&lt;ffffffffa0208db2&gt;] l2tp_xmit_skb+0x172/0xa50 [l2tp_core]

 but task is already holding lock:
  (&amp;(&amp;sch-&gt;busylock)-&gt;rlock){+.-...}, at: [&lt;ffffffff81596595&gt;] dev_queue_xmit+0xd75/0xe00

 which lock already depends on the new lock.

 the existing dependency chain (in reverse order) is:

 -&gt; #1 (&amp;(&amp;sch-&gt;busylock)-&gt;rlock){+.-...}:
        [&lt;ffffffff810a5df0&gt;] lock_acquire+0x90/0x200
        [&lt;ffffffff817499fc&gt;] _raw_spin_lock_irqsave+0x4c/0x60
        [&lt;ffffffff81074872&gt;] __wake_up+0x32/0x70
        [&lt;ffffffff8136d39e&gt;] tty_wakeup+0x3e/0x80
        [&lt;ffffffff81378fb3&gt;] pty_write+0x73/0x80
        [&lt;ffffffff8136cb4c&gt;] tty_put_char+0x3c/0x40
        [&lt;ffffffff813722b2&gt;] process_echoes+0x142/0x330
        [&lt;ffffffff813742ab&gt;] n_tty_receive_buf+0x8fb/0x1230
        [&lt;ffffffff813777b2&gt;] flush_to_ldisc+0x142/0x1c0
        [&lt;ffffffff81062818&gt;] process_one_work+0x198/0x760
        [&lt;ffffffff81063236&gt;] worker_thread+0x186/0x4b0
        [&lt;ffffffff810694d3&gt;] kthread+0x93/0xa0
        [&lt;ffffffff81753e24&gt;] kernel_thread_helper+0x4/0x10

 -&gt; #0 (l2tpsock){+.-...}:
        [&lt;ffffffff810a5288&gt;] __lock_acquire+0x1628/0x1b10
        [&lt;ffffffff810a5df0&gt;] lock_acquire+0x90/0x200
        [&lt;ffffffff817498c1&gt;] _raw_spin_lock+0x41/0x50
        [&lt;ffffffffa0208db2&gt;] l2tp_xmit_skb+0x172/0xa50 [l2tp_core]
        [&lt;ffffffffa021a802&gt;] l2tp_eth_dev_xmit+0x32/0x60 [l2tp_eth]
        [&lt;ffffffff815952b2&gt;] dev_hard_start_xmit+0x502/0xa70
        [&lt;ffffffff815b63ce&gt;] sch_direct_xmit+0xfe/0x290
        [&lt;ffffffff81595a05&gt;] dev_queue_xmit+0x1e5/0xe00
        [&lt;ffffffff815d9d60&gt;] ip_finish_output+0x3d0/0x890
        [&lt;ffffffff815db019&gt;] ip_output+0x59/0xf0
        [&lt;ffffffff815da36d&gt;] ip_local_out+0x2d/0xa0
        [&lt;ffffffff815da5a3&gt;] ip_queue_xmit+0x1c3/0x680
        [&lt;ffffffff815f4192&gt;] tcp_transmit_skb+0x402/0xa60
        [&lt;ffffffff815f4a94&gt;] tcp_write_xmit+0x1f4/0xa30
        [&lt;ffffffff815f5300&gt;] tcp_push_one+0x30/0x40
        [&lt;ffffffff815e6672&gt;] tcp_sendmsg+0xe82/0x1040
        [&lt;ffffffff81614495&gt;] inet_sendmsg+0x125/0x230
        [&lt;ffffffff81576cdc&gt;] sock_sendmsg+0xdc/0xf0
        [&lt;ffffffff81579ece&gt;] sys_sendto+0xfe/0x130
        [&lt;ffffffff81752c92&gt;] system_call_fastpath+0x16/0x1b
  Possible unsafe locking scenario:

        CPU0                    CPU1
        ----                    ----
   lock(&amp;(&amp;sch-&gt;busylock)-&gt;rlock);
                                lock(l2tpsock);
                                lock(&amp;(&amp;sch-&gt;busylock)-&gt;rlock);
   lock(l2tpsock);

  *** DEADLOCK ***

 5 locks held by netperf/4660:
  #0:  (sk_lock-AF_INET){+.+.+.}, at: [&lt;ffffffff815e581c&gt;] tcp_sendmsg+0x2c/0x1040
  #1:  (rcu_read_lock){.+.+..}, at: [&lt;ffffffff815da3e0&gt;] ip_queue_xmit+0x0/0x680
  #2:  (rcu_read_lock_bh){.+....}, at: [&lt;ffffffff815d9ac5&gt;] ip_finish_output+0x135/0x890
  #3:  (rcu_read_lock_bh){.+....}, at: [&lt;ffffffff81595820&gt;] dev_queue_xmit+0x0/0xe00
  #4:  (&amp;(&amp;sch-&gt;busylock)-&gt;rlock){+.-...}, at: [&lt;ffffffff81596595&gt;] dev_queue_xmit+0xd75/0xe00

 stack backtrace:
 Pid: 4660, comm: netperf Not tainted 3.6.0-rc3+ #788
 Call Trace:
  [&lt;ffffffff8173dbf8&gt;] print_circular_bug+0x1fb/0x20c
  [&lt;ffffffff810a5288&gt;] __lock_acquire+0x1628/0x1b10
  [&lt;ffffffff810a334b&gt;] ? check_usage+0x9b/0x4d0
  [&lt;ffffffff810a3f44&gt;] ? __lock_acquire+0x2e4/0x1b10
  [&lt;ffffffff810a5df0&gt;] lock_acquire+0x90/0x200
  [&lt;ffffffffa0208db2&gt;] ? l2tp_xmit_skb+0x172/0xa50 [l2tp_core]
  [&lt;ffffffff817498c1&gt;] _raw_spin_lock+0x41/0x50
  [&lt;ffffffffa0208db2&gt;] ? l2tp_xmit_skb+0x172/0xa50 [l2tp_core]
  [&lt;ffffffffa0208db2&gt;] l2tp_xmit_skb+0x172/0xa50 [l2tp_core]
  [&lt;ffffffffa021a802&gt;] l2tp_eth_dev_xmit+0x32/0x60 [l2tp_eth]
  [&lt;ffffffff815952b2&gt;] dev_hard_start_xmit+0x502/0xa70
  [&lt;ffffffff81594e0e&gt;] ? dev_hard_start_xmit+0x5e/0xa70
  [&lt;ffffffff81595961&gt;] ? dev_queue_xmit+0x141/0xe00
  [&lt;ffffffff815b63ce&gt;] sch_direct_xmit+0xfe/0x290
  [&lt;ffffffff81595a05&gt;] dev_queue_xmit+0x1e5/0xe00
  [&lt;ffffffff81595820&gt;] ? dev_hard_start_xmit+0xa70/0xa70
  [&lt;ffffffff815d9d60&gt;] ip_finish_output+0x3d0/0x890
  [&lt;ffffffff815d9ac5&gt;] ? ip_finish_output+0x135/0x890
  [&lt;ffffffff815db019&gt;] ip_output+0x59/0xf0
  [&lt;ffffffff815da36d&gt;] ip_local_out+0x2d/0xa0
  [&lt;ffffffff815da5a3&gt;] ip_queue_xmit+0x1c3/0x680
  [&lt;ffffffff815da3e0&gt;] ? ip_local_out+0xa0/0xa0
  [&lt;ffffffff815f4192&gt;] tcp_transmit_skb+0x402/0xa60
  [&lt;ffffffff815fa25e&gt;] ? tcp_md5_do_lookup+0x18e/0x1a0
  [&lt;ffffffff815f4a94&gt;] tcp_write_xmit+0x1f4/0xa30
  [&lt;ffffffff815f5300&gt;] tcp_push_one+0x30/0x40
  [&lt;ffffffff815e6672&gt;] tcp_sendmsg+0xe82/0x1040
  [&lt;ffffffff81614495&gt;] inet_sendmsg+0x125/0x230
  [&lt;ffffffff81614370&gt;] ? inet_create+0x6b0/0x6b0
  [&lt;ffffffff8157e6e2&gt;] ? sock_update_classid+0xc2/0x3b0
  [&lt;ffffffff8157e750&gt;] ? sock_update_classid+0x130/0x3b0
  [&lt;ffffffff81576cdc&gt;] sock_sendmsg+0xdc/0xf0
  [&lt;ffffffff81162579&gt;] ? fget_light+0x3f9/0x4f0
  [&lt;ffffffff81579ece&gt;] sys_sendto+0xfe/0x130
  [&lt;ffffffff810a69ad&gt;] ? trace_hardirqs_on+0xd/0x10
  [&lt;ffffffff8174a0b0&gt;] ? _raw_spin_unlock_irq+0x30/0x50
  [&lt;ffffffff810757e3&gt;] ? finish_task_switch+0x83/0xf0
  [&lt;ffffffff810757a6&gt;] ? finish_task_switch+0x46/0xf0
  [&lt;ffffffff81752cb7&gt;] ? sysret_check+0x1b/0x56
  [&lt;ffffffff81752c92&gt;] system_call_fastpath+0x16/0x1b

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: move and rename netif_notify_peers()</title>
<updated>2012-08-14T21:28:23Z</updated>
<author>
<name>Amerigo Wang</name>
</author>
<published>2012-08-09T22:14:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ee89bab14e857678f83a71ee99e575b0fdbb58d4'/>
<id>urn:sha1:ee89bab14e857678f83a71ee99e575b0fdbb58d4</id>
<content type='text'>
I believe net/core/dev.c is a better place for netif_notify_peers(),
because other net event notify functions also stay in this file.

And rename it to netdev_notify_peers().

Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Ian Campbell &lt;Ian.Campbell@citrix.com&gt;
Signed-off-by: Cong Wang &lt;amwang@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Convert net_ratelimit uses to net_&lt;level&gt;_ratelimited</title>
<updated>2012-05-15T17:45:03Z</updated>
<author>
<name>Joe Perches</name>
</author>
<published>2012-05-13T21:56:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e87cc4728f0e2fb663e592a1141742b1d6c63256'/>
<id>urn:sha1:e87cc4728f0e2fb663e592a1141742b1d6c63256</id>
<content type='text'>
Standardize the net core ratelimited logging functions.

Coalesce formats, align arguments.
Change a printk then vprintk sequence to use printf extension %pV.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>pkt_sched: Stop using NLA_PUT*().</title>
<updated>2012-04-01T22:11:37Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2012-03-29T09:11:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1b34ec43c9b3de44a5420841ab293d1b2035a94c'/>
<id>urn:sha1:1b34ec43c9b3de44a5420841ab293d1b2035a94c</id>
<content type='text'>
These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Add queue state xoff flag for stack</title>
<updated>2011-11-29T17:46:19Z</updated>
<author>
<name>Tom Herbert</name>
</author>
<published>2011-11-28T16:32:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7346649826382b769cfadf4a2fe8a84d060c55e9'/>
<id>urn:sha1:7346649826382b769cfadf4a2fe8a84d060c55e9</id>
<content type='text'>
Create separate queue state flags so that either the stack or drivers
can turn on XOFF.  Added a set of functions used in the stack to determine
if a queue is really stopped (either by stack or driver)

Signed-off-by: Tom Herbert &lt;therbert@google.com&gt;
Acked-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: new counter for tx_timeout errors in sysfs</title>
<updated>2011-11-17T04:14:02Z</updated>
<author>
<name>david decotigny</name>
</author>
<published>2011-11-16T12:15:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ccf5ff69fbbd8d877377f5786369cf5aa78a15fc'/>
<id>urn:sha1:ccf5ff69fbbd8d877377f5786369cf5aa78a15fc</id>
<content type='text'>
This adds the /sys/class/net/DEV/queues/Q/tx_timeout attribute
containing the total number of timeout events on the given queue. It
is always available with CONFIG_SYSFS, independently of
CONFIG_RPS/XPS.

Credits to Stephen Hemminger for a preliminary version of this patch.

Tested:
  without CONFIG_SYSFS (compilation only)
  with sysfs and without CONFIG_RPS &amp; CONFIG_XPS
  with sysfs and without CONFIG_RPS
  with sysfs and without CONFIG_XPS
  with defaults

Signed-off-by: David Decotigny &lt;david.decotigny@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Remove redundant variable/code in __qdisc_run</title>
<updated>2011-07-15T15:08:26Z</updated>
<author>
<name>Krishna Kumar</name>
</author>
<published>2011-07-14T23:16:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f0c50c7c9a4b0e92a9189c498e4960919fe66d45'/>
<id>urn:sha1:f0c50c7c9a4b0e92a9189c498e4960919fe66d45</id>
<content type='text'>
Remove redundant variable "work".

Signed-off-by: Krishna Kumar &lt;krkumar2@in.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net_sched: fix dequeuer fairness</title>
<updated>2011-06-27T07:14:10Z</updated>
<author>
<name>jamal</name>
</author>
<published>2011-06-26T08:13:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d5b8aa1d246fddfe4042be6f6eb169efa5cfbb94'/>
<id>urn:sha1:d5b8aa1d246fddfe4042be6f6eb169efa5cfbb94</id>
<content type='text'>
Results on dummy device can be seen in my netconf 2011
slides. These results are for a 10Gige IXGBE intel
nic - on another i5 machine, very similar specs to
the one used in the netconf2011 results.
It turns out - this is a hell lot worse than dummy
and so this patch is even more beneficial for 10G.

Test setup:
----------

System under test sending packets out.
Additional box connected directly dropping packets.
Installed prio qdisc on the eth device and default
netdev default length of 1000 used as is.
The 3 prio bands each were set to 100 (didnt factor in
the results).

5 packet runs were made and the middle 3 picked.

results
-------

The "cpu" column indicates the which cpu the sample
was taken on,
The "Pkt runx" carries the number of packets a cpu
dequeued when forced to be in the "dequeuer" role.
The "avg" for each run is the number of times each
cpu should be a "dequeuer" if the system was fair.

3.0-rc4      (plain)
cpu         Pkt run1        Pkt run2        Pkt run3
================================================
cpu0        21853354        21598183        22199900
cpu1          431058          473476          393159
cpu2          481975          477529          458466
cpu3        23261406        23412299        22894315
avg         11506948        11490372        11486460

3.0-rc4 with patch and default weight 64
cpu 	     Pkt run1        Pkt run2        Pkt run3
================================================
cpu0        13205312        13109359        13132333
cpu1        10189914        10159127        10122270
cpu2        10213871        10124367        10168722
cpu3        13165760        13164767        13096705
avg         11693714        11639405        11630008

As you can see the system is still not perfect but
is a lot better than what it was before...

At the moment we use the old backlog weight, weight_p
which is 64 packets. It seems to be reasonably fine
with that value.
The system could be made more fair if we reduce the
weight_p (as per my presentation), but we are going
to affect the shared backlog weight. Unless deemed
necessary, I think the default value is fine. If not
we could add yet another knob.

Signed-off-by: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Rework netdev_drivername() to avoid warning.</title>
<updated>2011-06-06T23:41:33Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2011-06-06T23:41:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3019de124b9f5b1526cb3668b74af14371e21795'/>
<id>urn:sha1:3019de124b9f5b1526cb3668b74af14371e21795</id>
<content type='text'>
This interface uses a temporary buffer, but for no real reason.
And now can generate warnings like:

net/sched/sch_generic.c: In function dev_watchdog
net/sched/sch_generic.c:254:10: warning: unused variable drivername

Just return driver-&gt;name directly or "".

Reported-by: Connor Hansen &lt;cmdkhh@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
