venti: new icache

This commit is contained in:
Russ Cox 2007-09-25 09:47:31 -04:00
parent 25a4e89fa9
commit 7a400ee957
17 changed files with 854 additions and 468 deletions

View file

@ -56,13 +56,7 @@ threadmain(int argc, char *argv[])
if(0) fprint(2, "initialize %d bytes of disk block cache\n", bcmem);
initdcache(bcmem);
initlumpcache(1*1024*1024, 1024/8);
icmem = u64log2(icmem / (sizeof(IEntry)+sizeof(IEntry*)) / ICacheDepth);
if(icmem < 4)
icmem = 4;
if(1) fprint(2, "initialize %d bytes of index cache for %d index entries\n",
(sizeof(IEntry)+sizeof(IEntry*)) * (1 << icmem) * ICacheDepth,
(1 << icmem) * ICacheDepth);
initicache(icmem, ICacheDepth);
initicache(icmem);
initicachewrite();
if(mainindex->bloom)
startbloomproc(mainindex->bloom);