From: Nikolay Aleksandrov <niko...@cumulusnetworks.com>

As Stephen pointed out the default initial size is more than we need, so
let's start small (4 elements, thus nelem_hint = 3). Also limit the hash
locks to the number of CPUs as we don't need any write-side scaling and
this looks like the minimum.

Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com>
---
 net/bridge/br_vlan.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c
index e227164bc3e1..283d012c3d89 100644
--- a/net/bridge/br_vlan.c
+++ b/net/bridge/br_vlan.c
@@ -19,6 +19,8 @@ static const struct rhashtable_params br_vlan_rht_params = {
        .head_offset = offsetof(struct net_bridge_vlan, vnode),
        .key_offset = offsetof(struct net_bridge_vlan, vid),
        .key_len = sizeof(u16),
+       .nelem_hint = 3,
+       .locks_mul = 1,
        .max_size = VLAN_N_VID,
        .obj_cmpfn = br_vlan_cmp,
        .automatic_shrinking = true,
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to