]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: Convert node object array to a hash table
authorAllan Stephens <allan.stephens@windriver.com>
Fri, 25 Feb 2011 23:42:52 +0000 (18:42 -0500)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Sun, 13 Mar 2011 20:35:17 +0000 (16:35 -0400)
commit8fe13065b14f01b9a030f46dda16603ae81344ff
treecca078684f8adee7450cadcb565176f0a8b111ff
parent925f6112c3f8740f0e9a596a7dcd2aea2377f565
tipc: Convert node object array to a hash table

Replaces the dynamically allocated array of pointers to the cluster's
node objects with a static hash table. Hash collisions are resolved
using chaining, with a typical hash chain having only a single node,
to avoid degrading performance during processing of incoming packets.
The conversion to a hash table reduces the memory requirements for
TIPC's node table to approximately the same size it had prior to
the previous commit.

In addition to the hash table itself, TIPC now also maintains a
linked list for the node objects, sorted by ascending network address.
This list allows TIPC to continue sending responses to user space
applications that request node and link information in sorted order.
The list also improves performance when name table update messages are
sent by making it easier to identify the nodes that must be notified.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
net/tipc/name_distr.c
net/tipc/net.c
net/tipc/net.h
net/tipc/node.c
net/tipc/node.h