提交 15c7f34b 创建 作者: Nickolai Zeldovich's avatar Nickolai Zeldovich

more iterations to make mapbench interesting

上级 ff541598
...@@ -14,7 +14,7 @@ thr(void *arg) ...@@ -14,7 +14,7 @@ thr(void *arg)
{ {
u64 tid = (u64)arg; u64 tid = (u64)arg;
for (int i = 0; i < 100; i++) { for (int i = 0; i < 10000; i++) {
volatile char *p = (char*) (0x40000UL + tid * 8 * 4096); volatile char *p = (char*) (0x40000UL + tid * 8 * 4096);
if (map((void *) p, 8 * 4096) < 0) { if (map((void *) p, 8 * 4096) < 0) {
printf(1, "%d: map failed\n", tid); printf(1, "%d: map failed\n", tid);
...@@ -68,7 +68,7 @@ main(int ac, char **av) ...@@ -68,7 +68,7 @@ main(int ac, char **av)
if(lastc==nthread) if(lastc==nthread)
break; break;
while(tcount==lastc) while(tcount==lastc)
__asm __volatile(""); __asm __volatile("":::"memory");
acquire(&l); acquire(&l);
} }
release(&l); release(&l);
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论