From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cong Wang Subject: Re: [PATCH v4] net: sched: convert qdisc linked list to hashtable Date: Thu, 28 Jul 2016 09:52:57 -0700 Message-ID: References: <1460646099.10638.44.camel@edumazet-glaptop3.roam.corp.google.com> <20160414151813.GE3715@orbyte.nwl.cc> <1460656170.10638.61.camel@edumazet-glaptop3.roam.corp.google.com> <5710E1C1.2090209@mojatatu.com> <1460732328.10638.74.camel@edumazet-glaptop3.roam.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Eric Dumazet , Jamal Hadi Salim , Phil Sutter , Linux Kernel Network Developers , LKML To: Jiri Kosina Return-path: Received: from mail-it0-f66.google.com ([209.85.214.66]:35915 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932581AbcG1QxS (ORCPT ); Thu, 28 Jul 2016 12:53:18 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Thu, Jul 28, 2016 at 2:56 AM, Jiri Kosina wrote: > From: Jiri Kosina > > 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 > --- > 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) > > v2 -> v3: resolve HASH_SIZE identifier conflicts in a cleaner way > fix up the number of hash bucket bits (4 bits for 16 buckets) > > v3 -> v4: put the hastable into struct netdevice only if > CONFIG_NET_SCHED has been enabled Reviewed-by: Cong Wang Thanks!