From 2312bf61ae365fdd6b9bfb24558a417859759447 Mon Sep 17 00:00:00 2001 From: Jon Paul Maloy Date: Thu, 19 Nov 2015 14:30:43 -0500 Subject: tipc: introduce per-link spinlock As a preparation to allow parallel links to work more independently from each other we introduce a per-link spinlock, to be stored in the struct nodes's link entry area. Since the node lock still is a regular spinlock there is no increase in parallellism at this stage. Reviewed-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller --- net/tipc/node.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'net/tipc/node.h') diff --git a/net/tipc/node.h b/net/tipc/node.h index dd79e9742bd6..8784907486c0 100644 --- a/net/tipc/node.h +++ b/net/tipc/node.h @@ -69,6 +69,7 @@ enum { struct tipc_link_entry { struct tipc_link *link; + spinlock_t lock; /* per-link */ u32 mtu; struct sk_buff_head inputq; struct tipc_media_addr maddr; @@ -86,7 +87,7 @@ struct tipc_bclink_entry { * struct tipc_node - TIPC node structure * @addr: network address of node * @ref: reference counter to node object - * @lock: spinlock governing access to structure + * @lock: rwlock governing access to structure * @net: the applicable net namespace * @hash: links to adjacent nodes in unsorted hash chain * @inputq: pointer to input queue containing messages for msg event -- cgit v1.2.3