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

            Bug ID: 221356
           Summary: [patch] Improve swapon_check_swzone() function in
                    swap_pager.c
           Product: Base System
           Version: 11.1-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: o...@j.email.ne.jp
          Keywords: patch

Created attachment 185184
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=185184&action=edit
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.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to