linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Deleting child qdisc doesn't reset parent to default qdisc?
@ 2016-04-14 14:44 Jiri Kosina
  2016-04-14 14:51 ` Jiri Kosina
  2016-04-14 15:01 ` Eric Dumazet
  0 siblings, 2 replies; 45+ messages in thread
From: Jiri Kosina @ 2016-04-14 14:44 UTC (permalink / raw)
  To: Jamal Hadi Salim; +Cc: netdev, linux-kernel

Hi,

I've came across the behavior where adding a child qdisc and then deleting 
it again makes the networking dysfunctional (I guess that's because all of 
a sudden there is absolutely no working qdisc on the device, although 
there originally was a default one in the parent).

In a nutshell, is this expected behavior or bug?

=====
jikos:~ # tc qdisc show
qdisc tbf 10: dev eth0 root refcnt 2 rate 800Mbit burst 131000b lat 1.0ms 
jikos:~ # ping -c 1 nix.cz | head -2
PING nix.cz (195.47.235.3) 56(84) bytes of data.
64 bytes from info.nix.cz (195.47.235.3): icmp_seq=1 ttl=89 time=1.59 ms

jikos:~ # tc qdisc add dev eth0 parent 10:1 sfq
jikos:~ # tc qdisc show
qdisc tbf 10: dev eth0 root refcnt 2 rate 800Mbit burst 131000b lat 1.0ms 
qdisc sfq 8008: dev eth0 parent 10:1 limit 127p quantum 1514b depth 127 divisor 1024 

jikos:~ # ping -c 1 nix.cz | head -2
PING nix.cz (195.47.235.3) 56(84) bytes of data.
64 bytes from info.nix.cz (195.47.235.3): icmp_seq=1 ttl=89 time=1.67 ms

jikos:~ # tc qdisc del dev eth0 parent 10:1 sfq
jikos:~ # tc qdisc show
qdisc tbf 10: dev eth0 root refcnt 2 rate 800Mbit burst 131000b lat 1.0ms 
jikos:~ # ping -c 1 nix.cz | head -2
PING nix.cz (195.47.235.3) 56(84) bytes of data.
	[ ... nothing happens ... ]
^C
jikos:~ # tc qdisc add dev eth0 parent 10:1 sfq
jikos:~ # ping -c 1 nix.cz | head -2
PING nix.cz (195.47.235.3) 56(84) bytes of data.
64 bytes from info.nix.cz (195.47.235.3): icmp_seq=1 ttl=89 time=1.66 ms
=====

Thanks,

-- 
Jiri Kosina

^ permalink raw reply	[flat|nested] 45+ messages in thread
* Re: [RFC PATCH v2] net: sched: convert qdisc linked list to hashtable
@ 2016-07-07 22:57 Craig Gallek
  2016-07-08  8:11 ` Jiri Kosina
  0 siblings, 1 reply; 45+ messages in thread
From: Craig Gallek @ 2016-07-07 22:57 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Eric Dumazet, Jamal Hadi Salim, Phil Sutter, netdev, LKML

On Thu, Jul 7, 2016 at 4:36 PM, Jiri Kosina <jikos@kernel.org> wrote:
> From: Jiri Kosina <jkosina@suse.cz>
>
> 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.
>
> As we're adding hashtable.h include into generic netdevice.h, we have to make
> sure HASH_SIZE macro is now non-conflicting with local definitions.
>
> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
> ---
>
> v1 -> v2:       fix up RCU hastable usage wrt. rtnl
>                 fix compilation of .c files which define their own
>                  HASH_SIZE that now oncflicts with the one from
>                  hashtable.h (newly included via netdevice.h)
This sort of seems like it's just side-stepping the problem.  Given
that the size of this hash table is fixed, the lookup time of this
operation is still going to approach linear as the number of qdiscs
increases.  I took a quick pass at trying to use rhashtable for this
purpose a few weeks ago but dropped it when I realized many of the
table operations (which can trigger resize events) need to happen
while holding the rtnl lock.  I still think it would be possible to
use a dynamically sizable datastructure for this purpose, but it will
be a fair amount of work to change the current locking semantics to
make it work...

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

end of thread, other threads:[~2016-08-01 10:24 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-14 14:44 Deleting child qdisc doesn't reset parent to default qdisc? Jiri Kosina
2016-04-14 14:51 ` Jiri Kosina
2016-04-14 15:01 ` Eric Dumazet
2016-04-14 15:18   ` Phil Sutter
2016-04-14 15:34     ` Jiri Kosina
2016-04-14 15:44       ` Eric Dumazet
2016-04-14 16:22         ` Phil Sutter
2016-04-14 16:40           ` Eric Dumazet
2016-04-14 16:08     ` Jiri Kosina
2016-04-14 17:49       ` Eric Dumazet
2016-04-15 12:42         ` Jamal Hadi Salim
2016-04-15 14:58           ` Eric Dumazet
2016-04-15 17:13             ` David Miller
2016-06-28 15:19             ` Jiri Kosina
2016-06-28 17:28               ` Cong Wang
2016-06-28 17:33                 ` Jiri Kosina
2016-06-28 16:49             ` [RFC PATCH] sch_tbf: avoid silent fallback to noop_qdisc (was Re: Deleting child qdisc doesn't reset parent to default qdisc?) Jiri Kosina
2016-07-07  9:04             ` [RFC PATCH] net: sched: convert qdisc linked list to hashtable " Jiri Kosina
2016-07-07 13:51               ` Eric Dumazet
2016-07-07 16:32                 ` Jiri Kosina
2016-07-07 16:53                   ` Eric Dumazet
2016-07-07 20:36               ` [RFC PATCH v2] net: sched: convert qdisc linked list to hashtable Jiri Kosina
2016-07-08  8:50                 ` Eric Dumazet
2016-07-08  9:02                   ` Jiri Kosina
2016-07-08 11:07                 ` Thomas Graf
2016-07-08 13:52                   ` Eric Dumazet
2016-07-11 14:02                 ` [RFC PATCH v3] " Jiri Kosina
2016-07-12 17:36                   ` Cong Wang
2016-07-13 13:47                     ` Jiri Kosina
2016-07-28  9:56                   ` [PATCH v4] " Jiri Kosina
2016-07-28 11:10                     ` kbuild test robot
2016-07-28 11:18                       ` Jiri Kosina
2016-07-28 12:53                         ` Fengguang Wu
2016-07-28 16:53                           ` Cong Wang
2016-07-31 11:21                           ` Fengguang Wu
2016-08-01 10:12                             ` Jiri Kosina
2016-07-28 11:22                     ` kbuild test robot
2016-07-28 11:52                     ` kbuild test robot
2016-07-28 16:52                     ` Cong Wang
2016-07-29  7:49                     ` [PATCH v5] " Jiri Kosina
2016-07-29 20:01                       ` kbuild test robot
2016-07-31  0:11                       ` kbuild test robot
2016-08-01 10:23                       ` [PATCH v6] " Jiri Kosina
2016-07-07 22:57 [RFC PATCH v2] " Craig Gallek
2016-07-08  8:11 ` Jiri Kosina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).