aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2014-05-04 20:56:10 -0400
committerDavid S. Miller <davem@davemloft.net>2014-05-05 17:26:44 -0400
commit486f930ac546914550b84abbc227867cc1be1f95 (patch)
tree357b3625876124fe0b449f9f0f3b3859b16cf2a7 /net/tipc
parent5356f3d7d48af72eb2a14b643d5563f068c44fe0 (diff)
tipc: adjust order of variables in tipc_node structure
Move more frequently used variables up to the head of tipc_node structure, hopefully improving a bit performance. Signed-off-by: Ying Xue <ying.xue@windriver.com> Reviewed-by: Erik Hugne <erik.hugne@ericsson.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/node.h63
1 files changed, 34 insertions, 29 deletions
diff --git a/net/tipc/node.h b/net/tipc/node.h
index 411b19114064..bb7f708ce19b 100644
--- a/net/tipc/node.h
+++ b/net/tipc/node.h
@@ -53,56 +53,61 @@
53#define WAIT_NODE_DOWN 0x0004 /* wait until peer node is declared down */ 53#define WAIT_NODE_DOWN 0x0004 /* wait until peer node is declared down */
54 54
55/** 55/**
56 * struct tipc_node_bclink - TIPC node bclink structure
57 * @acked: sequence # of last outbound b'cast message acknowledged by node
58 * @last_in: sequence # of last in-sequence b'cast message received from node
59 * @last_sent: sequence # of last b'cast message sent by node
60 * @oos_state: state tracker for handling OOS b'cast messages
61 * @deferred_size: number of OOS b'cast messages in deferred queue
62 * @deferred_head: oldest OOS b'cast message received from node
63 * @deferred_tail: newest OOS b'cast message received from node
64 * @reasm_head: broadcast reassembly queue head from node
65 * @reasm_tail: last broadcast fragment received from node
66 * @recv_permitted: true if node is allowed to receive b'cast messages
67 */
68struct tipc_node_bclink {
69 u32 acked;
70 u32 last_in;
71 u32 last_sent;
72 u32 oos_state;
73 u32 deferred_size;
74 struct sk_buff *deferred_head;
75 struct sk_buff *deferred_tail;
76 struct sk_buff *reasm_head;
77 struct sk_buff *reasm_tail;
78 bool recv_permitted;
79};
80
81/**
56 * struct tipc_node - TIPC node structure 82 * struct tipc_node - TIPC node structure
57 * @addr: network address of node 83 * @addr: network address of node
58 * @lock: spinlock governing access to structure 84 * @lock: spinlock governing access to structure
59 * @hash: links to adjacent nodes in unsorted hash chain 85 * @hash: links to adjacent nodes in unsorted hash chain
60 * @list: links to adjacent nodes in sorted list of cluster's nodes
61 * @nsub: list of "node down" subscriptions monitoring node
62 * @active_links: pointers to active links to node 86 * @active_links: pointers to active links to node
63 * @links: pointers to all links to node 87 * @links: pointers to all links to node
64 * @working_links: number of working links to node (both active and standby)
65 * @block_setup: bit mask of conditions preventing link establishment to node 88 * @block_setup: bit mask of conditions preventing link establishment to node
89 * @bclink: broadcast-related info
90 * @list: links to adjacent nodes in sorted list of cluster's nodes
91 * @working_links: number of working links to node (both active and standby)
66 * @link_cnt: number of links to node 92 * @link_cnt: number of links to node
67 * @signature: node instance identifier 93 * @signature: node instance identifier
68 * @bclink: broadcast-related info 94 * @nsub: list of "node down" subscriptions monitoring node
69 * @rcu: rcu struct for tipc_node 95 * @rcu: rcu struct for tipc_node
70 * @acked: sequence # of last outbound b'cast message acknowledged by node
71 * @last_in: sequence # of last in-sequence b'cast message received from node
72 * @last_sent: sequence # of last b'cast message sent by node
73 * @oos_state: state tracker for handling OOS b'cast messages
74 * @deferred_size: number of OOS b'cast messages in deferred queue
75 * @deferred_head: oldest OOS b'cast message received from node
76 * @deferred_tail: newest OOS b'cast message received from node
77 * @reasm_head: broadcast reassembly queue head from node
78 * @reasm_tail: last broadcast fragment received from node
79 * @recv_permitted: true if node is allowed to receive b'cast messages
80 */ 96 */
81struct tipc_node { 97struct tipc_node {
82 u32 addr; 98 u32 addr;
83 spinlock_t lock; 99 spinlock_t lock;
84 struct hlist_node hash; 100 struct hlist_node hash;
85 struct list_head list;
86 struct list_head nsub;
87 struct tipc_link *active_links[2]; 101 struct tipc_link *active_links[2];
88 struct tipc_link *links[MAX_BEARERS]; 102 struct tipc_link *links[MAX_BEARERS];
103 int block_setup;
104 struct tipc_node_bclink bclink;
105 struct list_head list;
89 int link_cnt; 106 int link_cnt;
90 int working_links; 107 int working_links;
91 int block_setup;
92 u32 signature; 108 u32 signature;
109 struct list_head nsub;
93 struct rcu_head rcu; 110 struct rcu_head rcu;
94 struct {
95 u32 acked;
96 u32 last_in;
97 u32 last_sent;
98 u32 oos_state;
99 u32 deferred_size;
100 struct sk_buff *deferred_head;
101 struct sk_buff *deferred_tail;
102 struct sk_buff *reasm_head;
103 struct sk_buff *reasm_tail;
104 bool recv_permitted;
105 } bclink;
106}; 111};
107 112
108extern struct list_head tipc_node_list; 113extern struct list_head tipc_node_list;