Module Name:    src
Committed By:   pooka
Date:           Mon Apr 29 09:30:18 UTC 2013

Modified Files:
        src/sys/rump/librump/rumpkern: locks.c

Log Message:
Disable spin mutexes for now.  They need some more work in the case
where a spin mutex is used as an argument to cv_wait().  Plus, it
would be good to sprinkle some asserts to make sure that the cpu
context is not released while holding on to a spin mutex.  All in
all, should not be difficult, but needs careful testing and bravery
(the scheduler will bite your legs off).


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/rump/librump/rumpkern/locks.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/rump/librump/rumpkern/locks.c
diff -u src/sys/rump/librump/rumpkern/locks.c:1.58 src/sys/rump/librump/rumpkern/locks.c:1.59
--- src/sys/rump/librump/rumpkern/locks.c:1.58	Sun Apr 28 13:37:52 2013
+++ src/sys/rump/librump/rumpkern/locks.c	Mon Apr 29 09:30:18 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: locks.c,v 1.58 2013/04/28 13:37:52 pooka Exp $	*/
+/*	$NetBSD: locks.c,v 1.59 2013/04/29 09:30:18 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.58 2013/04/28 13:37:52 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.59 2013/04/29 09:30:18 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/kmem.h>
@@ -113,8 +113,11 @@ mutex_init(kmutex_t *mtx, kmutex_type_t 
 		isspin = 1;
 	}
 
+#if 0
+	/* spin mutex support needs some cpu scheduler rework  */
 	if (isspin)
 		ruflags |= RUMPUSER_MTX_SPIN;
+#endif
 	rumpuser_mutex_init((struct rumpuser_mtx **)mtx, ruflags);
 	ALLOCK(mtx, &mutex_lockops);
 }
@@ -141,7 +144,7 @@ mutex_spin_enter(kmutex_t *mtx)
 {
 
 	WANTLOCK(mtx, false, false);
-	rumpuser_mutex_enter_nowrap(RUMPMTX(mtx));
+	rumpuser_mutex_enter(RUMPMTX(mtx));
 	LOCKED(mtx, false);
 }
 

Reply via email to