Module Name:    src
Committed By:   christos
Date:           Thu Jun 13 01:13:12 UTC 2019

Modified Files:
        src/sys/kern: subr_pool.c

Log Message:
make pool assertion messages consistent.


To generate a diff of this commit:
cvs rdiff -u -r1.250 -r1.251 src/sys/kern/subr_pool.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/kern/subr_pool.c
diff -u src/sys/kern/subr_pool.c:1.250 src/sys/kern/subr_pool.c:1.251
--- src/sys/kern/subr_pool.c:1.250	Thu May  9 04:16:14 2019
+++ src/sys/kern/subr_pool.c	Wed Jun 12 21:13:12 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_pool.c,v 1.250 2019/05/09 08:16:14 skrll Exp $	*/
+/*	$NetBSD: subr_pool.c,v 1.251 2019/06/13 01:13:12 christos Exp $	*/
 
 /*
  * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010, 2014, 2015, 2018
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.250 2019/05/09 08:16:14 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.251 2019/06/13 01:13:12 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -516,8 +516,8 @@ pr_rmpage(struct pool *pp, struct pool_i
 	if (ph->ph_nmissing == 0) {
 		KASSERT(pp->pr_nidle != 0);
 		KASSERTMSG((pp->pr_nitems >= pp->pr_itemsperpage),
-		    "nitems=%u < itemsperpage=%u",
-		    pp->pr_nitems, pp->pr_itemsperpage);
+		    "%s: [%s] nitems=%u < itemsperpage=%u", __func__,
+		    pp->pr_wchan, pp->pr_nitems, pp->pr_itemsperpage);
 		pp->pr_nidle--;
 	}
 
@@ -884,7 +884,8 @@ pool_destroy(struct pool *pp)
 
 	KASSERT(pp->pr_cache == NULL);
 	KASSERTMSG((pp->pr_nout == 0),
-	    "%s: pool busy: still out: %u", __func__, pp->pr_nout);
+	    "%s: [%s] pool busy: still out: %u", __func__, pp->pr_wchan,
+	    pp->pr_nout);
 	KASSERT(LIST_EMPTY(&pp->pr_fullpages));
 	KASSERT(LIST_EMPTY(&pp->pr_partpages));
 
@@ -1043,7 +1044,7 @@ pool_get(struct pool *pp, int flags)
 	}
 	if (pp->pr_roflags & PR_USEBMAP) {
 		KASSERTMSG((ph->ph_nmissing < pp->pr_itemsperpage),
-		    "%s: %s: page empty", __func__, pp->pr_wchan);
+		    "%s: [%s] pool page empty", __func__, pp->pr_wchan);
 		v = pr_item_bitmap_get(pp, ph);
 	} else {
 		v = pr_item_linkedlist_get(pp, ph);

Reply via email to