diff options
author | Jon Maloy <jon.maloy@ericsson.com> | 2018-03-29 23:20:41 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-31 22:19:52 -0400 |
commit | 218527fe27adaebeb81eb770459eb335517e90ee (patch) | |
tree | 42001e81e0214aedd8d42ebf810f4d7542ce6a8a /net/tipc/name_table.h | |
parent | 24197ee2102359b59044234347dd3504302fa97d (diff) | |
download | linux-218527fe27adaebeb81eb770459eb335517e90ee.tar.gz linux-218527fe27adaebeb81eb770459eb335517e90ee.tar.bz2 linux-218527fe27adaebeb81eb770459eb335517e90ee.zip |
tipc: replace name table service range array with rb tree
The current design of the binding table has an unnecessary memory
consuming and complex data structure. It aggregates the service range
items into an array, which is expanded by a factor two every time it
becomes too small to hold a new item. Furthermore, the arrays never
shrink when the number of ranges diminishes.
We now replace this array with an RB tree that is holding the range
items as tree nodes, each range directly holding a list of bindings.
This, along with a few name changes, improves both readability and
volume of the code, as well as reducing memory consumption and hopefully
improving cache hit rate.
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/name_table.h')
-rw-r--r-- | net/tipc/name_table.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/name_table.h b/net/tipc/name_table.h index 34a4ccb907aa..1b03b8751707 100644 --- a/net/tipc/name_table.h +++ b/net/tipc/name_table.h @@ -97,7 +97,7 @@ struct publication { * @local_publ_count: number of publications issued by this node */ struct name_table { - struct hlist_head seq_hlist[TIPC_NAMETBL_SIZE]; + struct hlist_head services[TIPC_NAMETBL_SIZE]; struct list_head node_scope; struct list_head cluster_scope; u32 local_publ_count; |