提交 b84cc08d 创建 作者: Frans Kaashoek's avatar Frans Kaashoek

Run with bigger hash tables

上级 f8c563df
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#if SPINLOCK_DEBUG #if SPINLOCK_DEBUG
#define NHASH 10 #define NHASH 10
#else #else
#define NHASH 30 #define NHASH 257
#endif #endif
template<class K, class V> template<class K, class V>
...@@ -27,10 +27,11 @@ class xelem : public rcu_freed { ...@@ -27,10 +27,11 @@ class xelem : public rcu_freed {
NEW_DELETE_OPS(xelem) NEW_DELETE_OPS(xelem)
}; };
// XXX maybe not cache align, because it takes too much space
template<class K, class V> template<class K, class V>
struct xbucket { struct xbucket {
std::atomic<xelem<K, V>*> volatile chain; std::atomic<xelem<K, V>*> volatile chain;
} __attribute__((aligned (CACHELINE))); } ; // __attribute__((aligned (CACHELINE)));
template<class K, class V, u64 (*HF)(const K&)> template<class K, class V, u64 (*HF)(const K&)>
class xns : public rcu_freed { class xns : public rcu_freed {
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论