Module Name: src Committed By: ad Date: Mon May 25 19:46:20 UTC 2020
Modified Files: src/sys/uvm: uvm_pdaemon.c Log Message: uvm_pageout_done(): do nothing when npages is zero. To generate a diff of this commit: cvs rdiff -u -r1.126 -r1.127 src/sys/uvm/uvm_pdaemon.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/uvm/uvm_pdaemon.c diff -u src/sys/uvm/uvm_pdaemon.c:1.126 src/sys/uvm/uvm_pdaemon.c:1.127 --- src/sys/uvm/uvm_pdaemon.c:1.126 Mon Apr 13 15:54:45 2020 +++ src/sys/uvm/uvm_pdaemon.c Mon May 25 19:46:20 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_pdaemon.c,v 1.126 2020/04/13 15:54:45 maxv Exp $ */ +/* $NetBSD: uvm_pdaemon.c,v 1.127 2020/05/25 19:46:20 ad Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uvm_pdaemon.c,v 1.126 2020/04/13 15:54:45 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_pdaemon.c,v 1.127 2020/05/25 19:46:20 ad Exp $"); #include "opt_uvmhist.h" #include "opt_readahead.h" @@ -355,7 +355,12 @@ void uvm_pageout_done(int npages) { - KASSERT(uvmexp.paging >= npages); + KASSERT(atomic_load_relaxed(&uvmexp.paging) >= npages); + + if (npages == 0) { + return; + } + atomic_add_int(&uvmexp.paging, -npages); /*