From 9b35f1e4c8561fd8937ab394e65cc9b230ea854d Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 7 Jul 2011 10:24:00 -0400 Subject: [PATCH] rculfhash: change order of node fields for locality Signed-off-by: Mathieu Desnoyers --- urcu/rculfhash.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/urcu/rculfhash.h b/urcu/rculfhash.h index e650acd..2e50beb 100644 --- a/urcu/rculfhash.h +++ b/urcu/rculfhash.h @@ -5,12 +5,14 @@ #include struct rcu_ht_node { + /* cache-hot for iteration */ struct rcu_ht_node *next; - void *key; - size_t key_len; - unsigned long hash; unsigned long reverse_hash; + void *key; + unsigned int key_len; unsigned int dummy; + /* cache-cold for iteration */ + unsigned long hash; struct rcu_head head; }; -- 2.34.1