]> asedeno.scripts.mit.edu Git - linux.git/commit
tipc: replace name table service range array with rb tree
authorJon Maloy <jon.maloy@ericsson.com>
Thu, 29 Mar 2018 21:20:41 +0000 (23:20 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Apr 2018 02:19:52 +0000 (22:19 -0400)
commit218527fe27adaebeb81eb770459eb335517e90ee
tree42001e81e0214aedd8d42ebf810f4d7542ce6a8a
parent24197ee2102359b59044234347dd3504302fa97d
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>
net/tipc/core.h
net/tipc/link.c
net/tipc/name_table.c
net/tipc/name_table.h
net/tipc/node.c
net/tipc/subscr.h