[Bug 221356] [patch] Improve swapon_check_swzone() function in swap_pager.c

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Oct 11 05:22:35 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221356

--- Comment #11 from ota at j.email.ne.jp ---
Created attachment 187071
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=187071&action=edit
set vm_swap_enabled=1 after swap zones are initialized

This is a proposal and not an complete change.

One purpose is set vm_swap_enabled to 1 after swap initialization is completed.

Another purpose is to avoid/reduce panic().  Given the change tested with
"NO_SWAPPING in vm_pageout()", if we set zones to NULL, we can effectively
disable swapping.

The catch with this change set is 1st uma_zone_reserve_kva() allocated in KVA
for swpctrie_zone won't be freed if 2nd uma_zone_reserve_kva() for swblk_zone
fails and tries to recover.  I couldn't find proper UMA API to release reserved
space.
Also, we may not need to check swblk_zone here.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list