mlock() and vm_max_wired

看板FB_hackers作者時間11年前 (2014/06/23 18:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
Hello! I am using FreeBSD-10/stable and have a problem with mlock(). I have 256GB of memory and a program which does mmap+mlock on a number of data files. It can process one file several times (so it does mmap() + mlock() on the same file more than once). I set vm.max_wired=67108864 (67108864 * 4k = 256GB), so it is allowed to mlock() the whole RAM. The total size of all files is about 180GB. The program fails with mlock: Resource temporarily unavailable error. If I increase vm.max_wired even more, the program works fine and after it starts top(1) shows about 186GB of Wired memory. Why does it fail with vm.max_wired=67108864? Is it a bug or am I missing something? Thanks. _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
文章代碼(AID): #1Jf_hVv0 (FB_hackers)
文章代碼(AID): #1Jf_hVv0 (FB_hackers)