git: fc15cf8786e2 - stable/13 - swap_pager: style, wrap long lines
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 30 Sep 2022 02:04:07 UTC
The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=fc15cf8786e25383f0e45c51ad5bc7f2c26e16b2 commit fc15cf8786e25383f0e45c51ad5bc7f2c26e16b2 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2022-09-13 10:03:11 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2022-09-30 00:29:09 +0000 swap_pager: style, wrap long lines (cherry picked from commit 26eed2aa06a2e523ffd4191ac67818242d5035e7) --- 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 67dc093f1e94..0cd8b498dc4f 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