Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern make pool assertion messages consistent.



details:   https://anonhg.NetBSD.org/src/rev/9860177db188
branches:  trunk
changeset: 842022:9860177db188
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Jun 13 01:13:12 2019 +0000

description:
make pool assertion messages consistent.

diffstat:

 sys/kern/subr_pool.c |  13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diffs (48 lines):

diff -r 576b3d6ad3fd -r 9860177db188 sys/kern/subr_pool.c
--- a/sys/kern/subr_pool.c      Thu Jun 13 00:24:43 2019 +0000
+++ b/sys/kern/subr_pool.c      Thu Jun 13 01:13:12 2019 +0000
@@ -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 @@
        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 @@
 
        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 @@
        }
        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);



Home | Main Index | Thread Index | Old Index