rcuja: add data structures for rcu_ja and shadow nodes
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 12 Aug 2012 18:38:52 +0000 (14:38 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 14 May 2013 14:19:47 +0000 (16:19 +0200)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
rcuja/rcuja-internal.h
rcuja/rcuja.c

index 604cb8ea03a44d74474105a987679512a87fe020..c03045103484cc4b505b076273ac8901b4524de8 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include <pthread.h>
+#include <urcu/rculfhash.h>
+
+/* Never declared. Opaque type used to store flagged node pointers. */
+struct rcu_ja_node_flag;
+
+/*
+ * Shadow node contains mutex and call_rcu head associated with a node.
+ */
+struct rcu_ja_shadow_node {
+       pthread_mutex_t lock;   /* mutual exclusion on node */
+       struct rcu_head head;   /* for deferred node and shadow node reclaim */
+};
+
+struct rcu_ja {
+       struct rcu_ja_node_flag *root;
+       /*
+        * We use a hash table to associate nodes to their respective
+        * shadow node. This helps reducing lookup hot path cache
+        * footprint, especially for very small nodes.
+        */
+       struct cds_lfht *ht;
+};
 
 #endif /* _URCU_RCUJA_INTERNAL_H */
index b164b96a48ca5d19507c67b2df812769ede423ed..6d815e2009d76916bc0491d9cee1f7fc03a3d1b7 100644 (file)
@@ -183,9 +183,6 @@ void static_array_size_check(void)
        CAA_BUILD_BUG_ON(CAA_ARRAY_SIZE(ja_types) > JA_TYPE_MAX_NR);
 }
 
-/* Never declared. Opaque type used to store flagged node pointers. */
-struct rcu_ja_node_flag;
-
 /*
  * The rcu_ja_node contains the compressed node data needed for
  * read-side. For linear and pool node configurations, it starts with a
This page took 0.028775 seconds and 4 git commands to generate.