From owner-freebsd-bugs@freebsd.org Wed Aug 9 05:22:22 2017 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B43E6DC3096 for ; Wed, 9 Aug 2017 05:22:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B9F8364E for ; Wed, 9 Aug 2017 05:22:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v795MKep045147 for ; Wed, 9 Aug 2017 05:22:20 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 221356] [patch] Improve swapon_check_swzone() function in swap_pager.c Date: Wed, 09 Aug 2017 05:22:20 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.1-RELEASE X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: ota@j.email.ne.jp X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Aug 2017 05:22:23 -0000 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 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.=