提交 87094f22 创建 作者: Nickolai Zeldovich's avatar Nickolai Zeldovich

cache alignment

上级 404afe5b
#include "types.h"
#include "defs.h"
#include "spinlock.h"
#include "param.h"
// name spaces
// XXX maybe use open hash table, no chain, better cache locality
......@@ -11,7 +12,6 @@
#define NHASH 100
#endif
// XXX cache align
struct elem {
int key;
void *val;
......@@ -21,7 +21,7 @@ struct elem {
struct bucket {
struct spinlock l;
struct elem * volatile chain;
};
} __attribute__((aligned (CACHELINE)));
struct ns {
int used;
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论