Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 May 2012 02:59:28 GMT
From:      Mark Linimon <linimon@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/168211: [kernel] [patch] uma_core.c is missing at least one (possibly two) sleep counts
Message-ID:  <201205220259.q4M2xSHY056814@freefall.freebsd.org>
Resent-Message-ID: <201205220300.q4M30CGb056990@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         168211
>Category:       kern
>Synopsis:       [kernel] [patch] uma_core.c is missing at least one (possibly two) sleep counts
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 22 03:00:12 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Mark Linimon
>Release:        FreeBSD 9.0-STABLE i386
>Organization:
FreeBSD
>Environment:
System: FreeBSD freefall.freebsd.org 9.0-STABLE FreeBSD 9.0-STABLE #6 r235139: Tue May 8 21:19:03 UTC 2012 simon@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL i386
>Description:
In at least one case the zone sleep counts are not being incremented.  I'n not sure
about the second; someone who understands this better will have to review.
>How-To-Repeat:
>Fix:
Index: uma_core.c
===================================================================
RCS file: /home/FreeBSD/ncvs/src/sys/vm/uma_core.c,v
retrieving revision 1.173
diff -u -r1.173 uma_core.c
--- uma_core.c	27 Jan 2012 20:18:31 -0000	1.173
+++ uma_core.c	22 May 2012 02:55:49 -0000
@@ -770,6 +770,7 @@
 		if (waitok == M_NOWAIT)
 			goto out;
 		mtx_unlock(&uma_mtx);
+		zone->uz_sleeps++;		// XXX MCL
 		msleep(zone, zone->uz_lock, PVM, "zonedrain", 1);
 		mtx_lock(&uma_mtx);
 	}
@@ -2196,6 +2197,7 @@
 				zone->uz_flags |= UMA_ZFLAG_FULL;
 			if (flags & M_NOWAIT)
 				break;
+			// XXX MCL no sleep count is kept track of here!
 			msleep(keg, &keg->uk_lock, PVM, "keglimit", 0);
 			continue;
 		}
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205220259.q4M2xSHY056814>