From nobody Tue Jan 18 13:36:26 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CBFF41963B86; Tue, 18 Jan 2022 13:36:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JdVDB5GrHz3qqy; Tue, 18 Jan 2022 13:36:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642512986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XBoJWuSXRSjuY4RwGU8jU6UkHisFUFzWIFpYg8TlfoM=; b=mkC1/FdeNyPlRl2DOpWk+hbQN84GBah9zZB6U5/UPGWpJtiYe7KnCN500CG9dGBPyVYoZk ukeNaCgX4NPqyBO5/w2IT0nda6t2RLLkcvoIPJL7oWK9HzH7lFmO/N+8cheLpor40w+upS qWgiAHI0I4RD9035i/9/2cG7gv57OmgHo51/yF3GQ1m0k0QeU8yHdJzuirF+NXxjBGoSIO oweu95MdG8oBzxaVd5lMb6phrP5t2ZcVAyMU/B4HvSrzqMRO1NMHADt9U6MAprlxDdczOw V9qyDR4oMB5z8vf4kaH13JzuanDjlq1SDnLYOeUYBY/k/itZEja05EDXrHbxMw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 90EEB223FA; Tue, 18 Jan 2022 13:36:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20IDaQl0016734; Tue, 18 Jan 2022 13:36:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20IDaQ1D016733; Tue, 18 Jan 2022 13:36:26 GMT (envelope-from git) Date: Tue, 18 Jan 2022 13:36:26 GMT Message-Id: <202201181336.20IDaQ1D016733@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: d41768d5c168 - stable/13 - vm_pageout: Group sysctl variables together with sysctl definitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d41768d5c168f2ca0af7a730be6fc9b99d9e0ec8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642512986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XBoJWuSXRSjuY4RwGU8jU6UkHisFUFzWIFpYg8TlfoM=; b=l5UCSIZ0vZHTu5wIt/38xpyWJ15rqnPXYuzoheto51MSaF8igFjEdxsonSYVv7nWXql380 O5WepDM5Cw23iTVo3WafUfuW1+XN76JGQlWQMINFHAMA+abYPyqoWGZyLkyNSOl4rfuxFM Si+xjtKryWQT8CEMVd/DEEXDkQm5mnF2GFMuhjlWcKD9ubDyPrjUEmszKAspoHYj0o1W7R B9Ns28FKkd4wNmu6A/ZYIQ+3MEu7VpwqjsseDDW/awWJPlaccLGXK0tL1ArC2z//vH4u2t DEBtYt3jFe2AfSasq5Em4umnwAVVXm3YydtfrBq30jyWnv5uWIDoihyBed8h7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642512986; a=rsa-sha256; cv=none; b=koMg5YCtbXjn3XI1knW67kRMKSVYAuNx1b4GyrvE03FDmC9u4Weun/IfZDxZNiuRlundY6 sxTFeVmnFSZi6Ggwjvjd5w950BLf9+n5o7DtYpD8ciWJlm5Q9IeMFn5EiEybf6crTJxix4 lsp2tT7vccQd37rA/s3SVsqHKGUcWXbqzW2s5j+1oK5/IJ1BUEO4BfrfO9vM61OXmRbYUL o56gjSvxF20PKWgdsgmNgXQSF+NwsokSSV9c6rPVFeB/hOFeLGQmBL7k3dXuTi8FMW264E ktb6BNp4JAHv6bjriZdQPHNHbWHjn6zuLDi9wH2sDZd9d4DZg7mGiCgCeTIySQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d41768d5c168f2ca0af7a730be6fc9b99d9e0ec8 commit d41768d5c168f2ca0af7a730be6fc9b99d9e0ec8 Author: Mark Johnston AuthorDate: 2022-01-11 14:22:44 +0000 Commit: Mark Johnston CommitDate: 2022-01-18 13:36:04 +0000 vm_pageout: Group sysctl variables together with sysctl definitions Fix some style bugs while here. No functional change intended. Reviewed by: alc, kib Sponsored by: The FreeBSD Foundation (cherry picked from commit c4a25e0713263200d41673fe1740e3e0362ccd95) --- sys/vm/vm_pageout.c | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index ff0c90843037..899d35cd43b6 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -148,41 +148,43 @@ SDT_PROBE_DEFINE(vm, , , vm__lowmem_scan); #define VM_LAUNDER_RATE 10 #define VM_INACT_SCAN_RATE 10 -static int vm_pageout_oom_seq = 12; - -static int vm_pageout_update_period; -static int disable_swap_pageouts; -static int lowmem_period = 10; static int swapdev_enabled; +int vm_pageout_page_count = 32; static int vm_panic_on_oom = 0; - SYSCTL_INT(_vm, OID_AUTO, panic_on_oom, - CTLFLAG_RWTUN, &vm_panic_on_oom, 0, - "Panic on the given number of out-of-memory errors instead of killing the largest process"); + CTLFLAG_RWTUN, &vm_panic_on_oom, 0, + "Panic on the given number of out-of-memory errors instead of " + "killing the largest process"); +static int vm_pageout_update_period; SYSCTL_INT(_vm, OID_AUTO, pageout_update_period, - CTLFLAG_RWTUN, &vm_pageout_update_period, 0, - "Maximum active LRU update period"); + CTLFLAG_RWTUN, &vm_pageout_update_period, 0, + "Maximum active LRU update period"); static int pageout_cpus_per_thread = 16; SYSCTL_INT(_vm, OID_AUTO, pageout_cpus_per_thread, CTLFLAG_RDTUN, &pageout_cpus_per_thread, 0, "Number of CPUs per pagedaemon worker thread"); +static int lowmem_period = 10; SYSCTL_INT(_vm, OID_AUTO, lowmem_period, CTLFLAG_RWTUN, &lowmem_period, 0, - "Low memory callback period"); + "Low memory callback period"); +static int disable_swap_pageouts; SYSCTL_INT(_vm, OID_AUTO, disable_swapspace_pageouts, - CTLFLAG_RWTUN, &disable_swap_pageouts, 0, "Disallow swapout of dirty pages"); + CTLFLAG_RWTUN, &disable_swap_pageouts, 0, + "Disallow swapout of dirty pages"); static int pageout_lock_miss; SYSCTL_INT(_vm, OID_AUTO, pageout_lock_miss, - CTLFLAG_RD, &pageout_lock_miss, 0, "vget() lock misses during pageout"); + CTLFLAG_RD, &pageout_lock_miss, 0, + "vget() lock misses during pageout"); +static int vm_pageout_oom_seq = 12; SYSCTL_INT(_vm, OID_AUTO, pageout_oom_seq, - CTLFLAG_RWTUN, &vm_pageout_oom_seq, 0, - "back-to-back calls to oom detector to start OOM"); + CTLFLAG_RWTUN, &vm_pageout_oom_seq, 0, + "back-to-back calls to oom detector to start OOM"); static int act_scan_laundry_weight = 3; SYSCTL_INT(_vm, OID_AUTO, act_scan_laundry_weight, CTLFLAG_RWTUN, @@ -196,9 +198,8 @@ SYSCTL_UINT(_vm, OID_AUTO, background_launder_rate, CTLFLAG_RWTUN, static u_int vm_background_launder_max = 20 * 1024; SYSCTL_UINT(_vm, OID_AUTO, background_launder_max, CTLFLAG_RWTUN, - &vm_background_launder_max, 0, "background laundering cap, in kilobytes"); - -int vm_pageout_page_count = 32; + &vm_background_launder_max, 0, + "background laundering cap, in kilobytes"); u_long vm_page_max_user_wired; SYSCTL_ULONG(_vm, OID_AUTO, max_user_wired, CTLFLAG_RW,