Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 Aug 2017 05:22:20 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 221356] [patch] Improve swapon_check_swzone() function in swap_pager.c
Message-ID:  <bug-221356-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221356

            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: ota@j.email.ne.jp
          Keywords: patch

Created attachment 185184
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D185184&action=
=3Dedit
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 spac=
e.
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.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-221356-8>