PR kern/48044: panic: kernel diagnostic assertion "uvmexp.swpgonly + npages <= uvmexp.swpginuse" failed

swpgonly is updated asynchronously with regard to swap use.  We can't assert
this condition with confidence in the post-5.0 world, at least not without
broader changes.  swpgonly's ultimate use is of a heuristic nature so this
is no problem at all.
This commit is contained in:
ad 2019-12-27 00:46:38 +00:00
parent a047abdf83
commit bfe890c63e
1 changed files with 2 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_pager.c,v 1.117 2019/12/21 14:41:44 ad Exp $ */
/* $NetBSD: uvm_pager.c,v 1.118 2019/12/27 00:46:38 ad Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uvm_pager.c,v 1.117 2019/12/21 14:41:44 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: uvm_pager.c,v 1.118 2019/12/27 00:46:38 ad Exp $");
#include "opt_uvmhist.h"
#include "opt_readahead.h"
@ -464,7 +464,6 @@ uvm_aio_aiodone_pages(struct vm_page **pgs, int npages, bool write, int error)
/* these pages are now only in swap. */
if (error != ENOMEM) {
KASSERT(uvmexp.swpgonly + npages <= uvmexp.swpginuse);
atomic_add_int(&uvmexp.swpgonly, npages);
}
if (error) {