From nobody Fri Sep 16 20:25:34 2022 X-Original-To: dev-commits-src-main@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 4MTlv31JDDz4d6tV; Fri, 16 Sep 2022 20:25:35 +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 4MTlv30c5Hz3M22; Fri, 16 Sep 2022 20:25:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663359935; 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=70ASRBGObHAg6RGSjqoIbr7RJNhufOR09AOR1SB6txA=; b=TEHxzGJdXfTPqhTpy+MyEc/4DENPKYgQ/M4MVuvDCjCpA52GbshrLPe/38e1wPIGBZ30PE 5oTlwokNiSP/PnqPOTcaKMLbvfUXnwABmR+Z2HqgTAP8OZNDNCHUxMfJv3AhU40F2idet1 jkWPbqAN6AH/Sx8L7WCYOAsXnYSe+KXfRV+A29kIjjH0MmqWRBI5EBVvOJI1XmCleu3lED nhv8l0wri0aTxt3ke6pWRMbqvVVX81ysjRl1J/3y72fUXWP3HLzTjoirzxPbb+LmkXbi4I OXYxCWmSbb8A4vdhpt3ntkg0ownRfJZ7PHjg0sgbxmu31youPgK8s9m7Hp3PYw== 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 4MTlv26l51zT8p; Fri, 16 Sep 2022 20:25:34 +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 28GKPYb9026235; Fri, 16 Sep 2022 20:25:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28GKPYLp026234; Fri, 16 Sep 2022 20:25:34 GMT (envelope-from git) Date: Fri, 16 Sep 2022 20:25:34 GMT Message-Id: <202209162025.28GKPYLp026234@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 26eed2aa06a2 - main - swap_pager: style, wrap long lines List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 26eed2aa06a2e523ffd4191ac67818242d5035e7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663359935; 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=70ASRBGObHAg6RGSjqoIbr7RJNhufOR09AOR1SB6txA=; b=lC55xWNwSJhiKkueir1i+JWjWT1n9FAXPkgZ3RUPSCw/8+021jw4IPJtJWupj93Jrq/IDI cfLKDEKRwikOFz/NzeiT3dE8TCxoacE7ZCZK48cI0nrbJQzqWx5ETapi0dn8hDEU3jGgu4 0ZsoVX4zeoFPrjPfpJwM+Oewd6AqYVtihWeT2vkWIlGipazqAv9OAf5knBltY9CXc877BI 2FljfditoaTI0HOGZNx3zSi0vC6KNt/Af1BMKO8FTL2Rl9LW9FK7Zz0w5DLZSPtZfcKicu zVMz98ujsKVuekm2j3oarYTbe7jebD7VAdBfLNHabzWW/b/ZyqiX1d11DkXsjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663359935; a=rsa-sha256; cv=none; b=OtIYMizMrUGVK3Gdu7cm6+i39fn2N4DOKDYmXwfgWJ1kUOBAAuW+R5bcBG5pTKt6kpuSxR vU1kyappPd7zuVDCzR0RNzZ57owsiyrqiex0hU6eTNTSr+z7dwGfHAUlQUfsyNwHyqge2X vYWjSzmrE7psxcphWEvZBQOG63ksoQv28/5fyAH79FtaAZqkdDCPXARHOMrpYJnUuy6wzq bRchfMGvvcwPE6beed86CICEISBAmDbtlj0g8uhmvzL+w+KWs9ntD79hvsuVo3103sHUC1 LDHhF0BNWDYPCTrYi3m9pdR7kGg+nuuI0RZdE6St0Htszp4xUvK6SMhYd9BENw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=26eed2aa06a2e523ffd4191ac67818242d5035e7 commit 26eed2aa06a2e523ffd4191ac67818242d5035e7 Author: Konstantin Belousov AuthorDate: 2022-09-13 10:03:11 +0000 Commit: Konstantin Belousov CommitDate: 2022-09-16 20:23:13 +0000 swap_pager: style, wrap long lines Reviewed by: brooks, imp (previous version) Discussed with: markj Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D36540 --- sys/vm/swap_pager.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index d71d2ff27e6a..4db33d4ca88e 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -213,7 +213,8 @@ swap_reserve_by_cred_rlimit(u_long pincr, struct ucred *cred, int oc) prev + pincr > lim_cur(curthread, RLIMIT_SWAP) && priv_check(curthread, PRIV_VM_SWAP_NORLIMIT) != 0) { prev = atomic_fetchadd_long(&uip->ui_vmsize, -pincr); - KASSERT(prev >= pincr, ("negative vmsize for uid = %d\n", uip->ui_uid)); + KASSERT(prev >= pincr, + ("negative vmsize for uid %d\n", uip->ui_uid)); return (false); } return (true); @@ -231,7 +232,8 @@ swap_release_by_cred_rlimit(u_long pdecr, struct ucred *cred) #ifdef INVARIANTS prev = atomic_fetchadd_long(&uip->ui_vmsize, -pdecr); - KASSERT(prev >= pdecr, ("negative vmsize for uid = %d\n", uip->ui_uid)); + KASSERT(prev >= pdecr, + ("negative vmsize for uid %d\n", uip->ui_uid)); #else atomic_subtract_long(&uip->ui_vmsize, pdecr); #endif @@ -264,8 +266,8 @@ swap_reserve_by_cred(vm_ooffset_t incr, struct ucred *cred) static int curfail; static struct timeval lastfail; - KASSERT((incr & PAGE_MASK) == 0, ("%s: incr: %ju & PAGE_MASK", __func__, - (uintmax_t)incr)); + KASSERT((incr & PAGE_MASK) == 0, ("%s: incr: %ju & PAGE_MASK", + __func__, (uintmax_t)incr)); #ifdef RACCT if (RACCT_ENABLED()) { @@ -289,13 +291,15 @@ swap_reserve_by_cred(vm_ooffset_t incr, struct ucred *cred) if ((oc & SWAP_RESERVE_FORCE_ON) != 0 && r > s && priv_check(curthread, PRIV_VM_SWAP_NOQUOTA) != 0) { prev = atomic_fetchadd_long(&swap_reserved, -pincr); - KASSERT(prev >= pincr, ("swap_reserved < incr on overcommit fail")); + KASSERT(prev >= pincr, + ("swap_reserved < incr on overcommit fail")); goto out_error; } if (!swap_reserve_by_cred_rlimit(pincr, cred, oc)) { prev = atomic_fetchadd_long(&swap_reserved, -pincr); - KASSERT(prev >= pincr, ("swap_reserved < incr on overcommit fail")); + KASSERT(prev >= pincr, + ("swap_reserved < incr on overcommit fail")); goto out_error; } @@ -303,7 +307,8 @@ swap_reserve_by_cred(vm_ooffset_t incr, struct ucred *cred) out_error: if (ppsratecheck(&lastfail, &curfail, 1)) { - printf("uid %d, pid %d: swap reservation for %jd bytes failed\n", + printf("uid %d, pid %d: swap reservation " + "for %jd bytes failed\n", cred->cr_ruidinfo->ui_uid, curproc->p_pid, incr); } #ifdef RACCT @@ -322,8 +327,8 @@ swap_reserve_force(vm_ooffset_t incr) { u_long pincr; - KASSERT((incr & PAGE_MASK) == 0, ("%s: incr: %ju & PAGE_MASK", __func__, - (uintmax_t)incr)); + KASSERT((incr & PAGE_MASK) == 0, ("%s: incr: %ju & PAGE_MASK", + __func__, (uintmax_t)incr)); #ifdef RACCT if (RACCT_ENABLED()) { @@ -356,8 +361,8 @@ swap_release_by_cred(vm_ooffset_t decr, struct ucred *cred) u_long prev; #endif - KASSERT((decr & PAGE_MASK) == 0, ("%s: decr: %ju & PAGE_MASK", __func__, - (uintmax_t)decr)); + KASSERT((decr & PAGE_MASK) == 0, ("%s: decr: %ju & PAGE_MASK", + __func__, (uintmax_t)decr)); pdecr = atop(decr); #ifdef INVARIANTS