Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/librump/rumpkern Disable spin mutexes for now. The...



details:   https://anonhg.NetBSD.org/src/rev/8f67d7ff332e
branches:  trunk
changeset: 786461:8f67d7ff332e
user:      pooka <pooka%NetBSD.org@localhost>
date:      Mon Apr 29 09:30:18 2013 +0000

description:
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).

diffstat:

 sys/rump/librump/rumpkern/locks.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (39 lines):

diff -r d5d71d71d2df -r 8f67d7ff332e sys/rump/librump/rumpkern/locks.c
--- a/sys/rump/librump/rumpkern/locks.c Mon Apr 29 07:21:59 2013 +0000
+++ b/sys/rump/librump/rumpkern/locks.c Mon Apr 29 09:30:18 2013 +0000
@@ -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 @@
                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 @@
 {
 
        WANTLOCK(mtx, false, false);
-       rumpuser_mutex_enter_nowrap(RUMPMTX(mtx));
+       rumpuser_mutex_enter(RUMPMTX(mtx));
        LOCKED(mtx, false);
 }
 



Home | Main Index | Thread Index | Old Index