Bug ID: 221356
           Summary: [patch] Improve swapon_check_swzone() function in
           Product: Base System
           Version: 11.1-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Keywords: patch

Created attachment 185184
Improve swapon_check_swzone() function

Improve swapon_check_swzone() function.

Change to more descriptive swapon_check_swzone() warnings.
#1 Indicate half the size is recommended size.
(I couldn't figure out and don't know why half is recommended, though.)
#2 Advice when the swap device size exceeds the max size.

Convert swap_pager_full to static variable as it is not used in global space.
Add a unit to swap_total description.
Call uma_zone_get_max() to find proper swap_maxpages.
Use swap_maxpages and other global variable in swapon_check_swzone().
Convert swapon_check_swzone() to a void function.

Patch tested on 11.1-RELEASE and compiled on CURRENT of i386.

How to test
$ swapon <extra devices>
until you exceed these 2 thresholds - half size and the max size.
Easier to test on systems with less memory.

You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________ mailing list
To unsubscribe, send any mail to ""

Reply via email to