/* OK we're walking down this link */
old = container_of(eb_untag(troot, EB_NODE),
struct eb32_node, node.branches);
+
+ __builtin_prefetch(old->node.branches.b[0], 0);
+ __builtin_prefetch(old->node.branches.b[1], 0);
+
old_node_bit = old->node.bit;
/* Stop going down when we don't have common bits anymore. We
}
/* walk down */
- root = &old->node.branches;
side = (newkey >> old_node_bit) & EB_NODE_BRANCH_MASK;
- troot = root->b[side];
+ troot = side ? old->node.branches.b[1] : old->node.branches.b[0];
+ root = &old->node.branches;
}
new_left = eb_dotag(&new->node.branches, EB_LEFT);
/* OK we're walking down this link */
old = container_of(eb_untag(troot, EB_NODE),
struct eb32_node, node.branches);
+
+ __builtin_prefetch(old->node.branches.b[0], 0);
+ __builtin_prefetch(old->node.branches.b[1], 0);
+
old_node_bit = old->node.bit;
/* Stop going down when we don't have common bits anymore. We
}
/* walk down */
- root = &old->node.branches;
side = (newkey >> old_node_bit) & EB_NODE_BRANCH_MASK;
- troot = root->b[side];
+ troot = side ? old->node.branches.b[1] : old->node.branches.b[0];
+ root = &old->node.branches;
}
new_left = eb_dotag(&new->node.branches, EB_LEFT);
/* OK we're walking down this link */
old = container_of(eb_untag(troot, EB_NODE),
struct eb64_node, node.branches);
+
+ __builtin_prefetch(old->node.branches.b[0], 0);
+ __builtin_prefetch(old->node.branches.b[1], 0);
+
old_node_bit = old->node.bit;
/* Stop going down when we don't have common bits anymore. We
}
/* walk down */
- root = &old->node.branches;
if (sizeof(long) >= 8) {
side = newkey >> old_node_bit;
}
}
side &= EB_NODE_BRANCH_MASK;
- troot = root->b[side];
+ troot = side ? old->node.branches.b[1] : old->node.branches.b[0];
+ root = &old->node.branches;
}
/* Ok, now we are inserting <new> between <root> and <old>. <old>'s
/* OK we're walking down this link */
old = container_of(eb_untag(troot, EB_NODE),
struct eb64_node, node.branches);
+
+ __builtin_prefetch(old->node.branches.b[0], 0);
+ __builtin_prefetch(old->node.branches.b[1], 0);
+
old_node_bit = old->node.bit;
/* Stop going down when we don't have common bits anymore. We
}
/* walk down */
- root = &old->node.branches;
if (sizeof(long) >= 8) {
side = newkey >> old_node_bit;
}
}
side &= EB_NODE_BRANCH_MASK;
- troot = root->b[side];
+ troot = side ? old->node.branches.b[1] : old->node.branches.b[0];
+ root = &old->node.branches;
}
/* Ok, now we are inserting <new> between <root> and <old>. <old>'s