[Bug 223059] [patch] consider skipped 2 pages in sw_nblks and add size check before blist_alloc

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Oct 17 04:09:50 UTC 2017


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

            Bug ID: 223059
           Summary: [patch] consider skipped 2 pages in sw_nblks and add
                    size check before blist_alloc
           Product: Base System
           Version: 11.0-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: ota at j.email.ne.jp
          Keywords: patch

Created attachment 187229
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=187229&action=edit
sw_nblks offset by 2

As also noted in the patch,

swaponsomething() skips the first 2 pages.
Subtract these 2 pages from sw_nblcks as well as from swap_pager_avail and
swap_total to keep track the correct numbers.

Given sw_used and sw_nblcks now keeps track of correct pages,
we can use these to check remaining pages blist_alloc().
This improves situation where some of swap devices are filled.

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


More information about the freebsd-bugs mailing list