All of lore.kernel.org
 help / color / mirror / Atom feed
* 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; 7+ 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] 7+ messages in thread
* Deleting child qdisc doesn't reset parent to default qdisc?
@ 2016-04-14 14:44 Jiri Kosina
  2016-04-14 15:01 ` Eric Dumazet
  0 siblings, 1 reply; 7+ 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] 7+ messages in thread

end of thread, other threads:[~2016-07-08 13:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-07 22:57 [RFC PATCH v2] net: sched: convert qdisc linked list to hashtable Craig Gallek
2016-07-08  8:11 ` Jiri Kosina
  -- strict thread matches above, loose matches on Subject: below --
2016-04-14 14:44 Deleting child qdisc doesn't reset parent to default qdisc? Jiri Kosina
2016-04-14 15:01 ` Eric Dumazet
2016-04-14 15:18   ` Phil Sutter
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-07-07  9:04             ` [RFC PATCH] net: sched: convert qdisc linked list to hashtable (was Re: Deleting child qdisc doesn't reset parent to default qdisc?) Jiri Kosina
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.