6.2 -> 7.0 now mlock(2) fails
Dieter
freebsd at sopwith.solgatos.com
Tue May 6 15:03:36 UTC 2008
> It is. The pageout daemon initializes max_wired with:
>
> /* XXX does not really belong here */
> if (vm_page_max_wired == 0)
> vm_page_max_wired = cnt.v_free_count / 3;
>
I installed the following:
diff -r1.1 vm_pageout.c
1421c1421,1425
< vm_page_max_wired = cnt.v_free_count / 3;
---
> {
> printf("vm_page_max_wired was 0. cnt.v_free_count / 3 = %d\n", cnt.v_free_count / 3);
> printf("setting vm_page_max_wired to cnt.v_free_count / 2 = %d\n", cnt.v_free_count / 2);
> vm_page_max_wired = cnt.v_free_count / 2;
> }
Which gives:
vm_page_max_wired was 0. cnt.v_free_count / 3 = 165410
setting vm_page_max_wired to cnt.v_free_count / 2 = 248115
No mlock failures in ~2.5 weeks.
The largest value logged for vm.stats.vm.v_wire_count is 188614.
Thanks!
More information about the freebsd-questions
mailing list