提交 1d27eebf 创建 作者: Nickolai Zeldovich's avatar Nickolai Zeldovich

pin mapbench threads to specific cores, for good measure.

use virtual addresses further away from each other in mapbench, to avoid contending for radix_node cache lines.
上级 ae848a95
...@@ -13,12 +13,14 @@ void* ...@@ -13,12 +13,14 @@ void*
thr(void *arg) thr(void *arg)
{ {
u64 tid = (u64)arg; u64 tid = (u64)arg;
if (setaffinity(tid) < 0)
fprintf(1, "setaffinity err\n");
for (int i = 0; i < 1000000; i++) { for (int i = 0; i < 1000000; i++) {
if (verbose && ((i % 100) == 0)) if (verbose && ((i % 100) == 0))
fprintf(1, "%d: %d ops\n", tid, i); fprintf(1, "%d: %d ops\n", tid, i);
volatile char *p = (char*) (0x40000UL + tid * npg * 4096); volatile char *p = (char*) (0x100000000UL + tid * npg * 0x100000);
if (map((void *) p, npg * 4096) < 0) { if (map((void *) p, npg * 4096) < 0) {
fprintf(1, "%d: map failed\n", tid); fprintf(1, "%d: map failed\n", tid);
exit(); exit();
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论