svn commit: r260032 - head/sys/vm
Alan Cox
alc at FreeBSD.org
Sun Dec 29 04:54:52 UTC 2013
Author: alc
Date: Sun Dec 29 04:54:52 2013
New Revision: 260032
URL: http://svnweb.freebsd.org/changeset/base/260032
Log:
Add "popmap" assertions: The page being freed isn't already free, and the
page being allocated isn't already allocated.
Sponsored by: EMC / Isilon Storage Division
Modified:
head/sys/vm/vm_reserv.c
Modified: head/sys/vm/vm_reserv.c
==============================================================================
--- head/sys/vm/vm_reserv.c Sun Dec 29 03:43:25 2013 (r260031)
+++ head/sys/vm/vm_reserv.c Sun Dec 29 04:54:52 2013 (r260032)
@@ -241,6 +241,9 @@ vm_reserv_depopulate(vm_reserv_t rv, int
mtx_assert(&vm_page_queue_free_mtx, MA_OWNED);
KASSERT(rv->object != NULL,
("vm_reserv_depopulate: reserv %p is free", rv));
+ KASSERT(isset(rv->popmap, index),
+ ("vm_reserv_depopulate: reserv %p's popmap[%d] is clear", rv,
+ index));
KASSERT(rv->popcnt > 0,
("vm_reserv_depopulate: reserv %p's popcnt is corrupted", rv));
if (rv->inpartpopq) {
@@ -294,6 +297,9 @@ vm_reserv_populate(vm_reserv_t rv, int i
mtx_assert(&vm_page_queue_free_mtx, MA_OWNED);
KASSERT(rv->object != NULL,
("vm_reserv_populate: reserv %p is free", rv));
+ KASSERT(isclr(rv->popmap, index),
+ ("vm_reserv_populate: reserv %p's popmap[%d] is set", rv,
+ index));
KASSERT(rv->popcnt < VM_LEVEL_0_NPAGES,
("vm_reserv_populate: reserv %p is already full", rv));
if (rv->inpartpopq) {
More information about the svn-src-head
mailing list