2008年1月25日 星期五

zfs 雷

i386 跑 zfs 很容易會遇到 kmem_map too small,然後 panic。(搞錯了,不是這個 patch,請看下一篇)

剛才 rafan 貼了一段 message 給我

Change type of kmem_used() and kmem_size() functions to uint64_t, so it
doesn't overflow in arc.c in this check:

if (kmem_used() > (kmem_size() * 4) / 5)
return (1);

With this bug ZFS almost doesn't cache.

Only 32bit machines are affected that have vm.kmem_size set to values >=1GB.

src/sys/compat/opensolaris/kern/opensolaris_kmem.c#rev1.3,還有 diff

搞笑 XD