Source-Changes-HG archive

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

[src/netbsd-6]: src/sys Pull up following revision(s) (requested by rmind in ...



details:   https://anonhg.NetBSD.org/src/rev/73c3b72f7331
branches:  netbsd-6
changeset: 775633:73c3b72f7331
user:      riz <riz%NetBSD.org@localhost>
date:      Fri Feb 08 19:32:07 2013 +0000

description:
Pull up following revision(s) (requested by rmind in ticket #782):
        sys/rump/include/machine/intr.h: revision 1.19
        sys/kern/subr_pserialize.c: revision 1.6
        sys/kern/kern_softint.c: revision 1.39
- softint_dispatch: perform pserialize(9) switchpoint when softintr processing
  finishes (without blocking).  Problem reported by hannken@, thanks!
- pserialize_read_enter: use splsoftserial(), not splsoftclock().
- pserialize_perform: add xcall(9) barrier as interrupts may be coalesced.
Provide splsoftserial.
GRRR RUMP

diffstat:

 sys/kern/kern_softint.c         |   8 ++++++--
 sys/kern/subr_pserialize.c      |  12 ++++++++----
 sys/rump/include/machine/intr.h |   3 ++-
 3 files changed, 16 insertions(+), 7 deletions(-)

diffs (100 lines):

diff -r b9595c44e3ca -r 73c3b72f7331 sys/kern/kern_softint.c
--- a/sys/kern/kern_softint.c   Fri Feb 08 19:18:09 2013 +0000
+++ b/sys/kern/kern_softint.c   Fri Feb 08 19:32:07 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_softint.c,v 1.38 2011/09/27 01:02:38 jym Exp $    */
+/*     $NetBSD: kern_softint.c,v 1.38.8.1 2013/02/08 19:32:07 riz Exp $        */
 
 /*-
  * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
@@ -176,7 +176,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.38 2011/09/27 01:02:38 jym Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.38.8.1 2013/02/08 19:32:07 riz Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -186,6 +186,7 @@
 #include <sys/evcnt.h>
 #include <sys/cpu.h>
 #include <sys/xcall.h>
+#include <sys/pserialize.h>
 
 #include <net/netisr.h>
 
@@ -828,6 +829,9 @@
                l->l_pflag &= ~LP_TIMEINTR;
        }
 
+       /* Indicate a soft-interrupt switch. */
+       pserialize_switchpoint();
+
        /*
         * If we blocked while handling the interrupt, the pinned LWP is
         * gone so switch to the idle LWP.  It will select a new LWP to
diff -r b9595c44e3ca -r 73c3b72f7331 sys/kern/subr_pserialize.c
--- a/sys/kern/subr_pserialize.c        Fri Feb 08 19:18:09 2013 +0000
+++ b/sys/kern/subr_pserialize.c        Fri Feb 08 19:32:07 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_pserialize.c,v 1.5 2012/01/29 22:55:40 rmind Exp $        */
+/*     $NetBSD: subr_pserialize.c,v 1.5.2.1 2013/02/08 19:32:07 riz Exp $      */
 
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_pserialize.c,v 1.5 2012/01/29 22:55:40 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pserialize.c,v 1.5.2.1 2013/02/08 19:32:07 riz Exp $");
 
 #include <sys/param.h>
 
@@ -139,6 +139,7 @@
 void
 pserialize_perform(pserialize_t psz)
 {
+       uint64_t xc;
 
        KASSERT(!cpu_intr_p());
        KASSERT(!cpu_softintr_p());
@@ -168,7 +169,10 @@
         * Force some context switch activity on every CPU, as the system
         * may not be busy.  Note: should pass the point twice.
         */
-       xc_broadcast(XC_HIGHPRI, (xcfunc_t)nullop, NULL, NULL);
+       xc = xc_broadcast(XC_HIGHPRI, (xcfunc_t)nullop, NULL, NULL);
+       xc_wait(xc);
+
+       /* No need to xc_wait() as we implement our own condvar. */
        xc_broadcast(XC_HIGHPRI, (xcfunc_t)nullop, NULL, NULL);
 
        /*
@@ -191,7 +195,7 @@
 {
 
        KASSERT(!cpu_intr_p());
-       return splsoftclock();
+       return splsoftserial();
 }
 
 void
diff -r b9595c44e3ca -r 73c3b72f7331 sys/rump/include/machine/intr.h
--- a/sys/rump/include/machine/intr.h   Fri Feb 08 19:18:09 2013 +0000
+++ b/sys/rump/include/machine/intr.h   Fri Feb 08 19:32:07 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intr.h,v 1.18 2011/03/21 16:41:08 pooka Exp $  */
+/*     $NetBSD: intr.h,v 1.18.10.1 2013/02/08 19:32:07 riz Exp $       */
 
 /*
  * Copyright (c) 2009, 2010 Antti Kantee.  All Rights Reserved.
@@ -47,6 +47,7 @@
 
 #define spllower(x) ((void)x)
 #define splraise(x) 0
+#define splsoftserial() 0
 #define splsoftnet() 0
 #define splsoftclock() 0
 #define splhigh() 0



Home | Main Index | Thread Index | Old Index