Module Name:    src
Committed By:   pooka
Date:           Sun Aug 15 20:23:04 UTC 2010

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

Log Message:
Increment lwp's context switch counter when it is scheduled onto
a CPU.  This fixes some heavy-load problems with the pool code when
rump kernels essentially lied and caused the pool code not to do
a proper backdown from the fastpath when a context switch happened
when taking a lock.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/rump/librump/rumpkern/scheduler.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/scheduler.c
diff -u src/sys/rump/librump/rumpkern/scheduler.c:1.17 src/sys/rump/librump/rumpkern/scheduler.c:1.18
--- src/sys/rump/librump/rumpkern/scheduler.c:1.17	Sun Jul 11 16:20:39 2010
+++ src/sys/rump/librump/rumpkern/scheduler.c	Sun Aug 15 20:23:04 2010
@@ -1,4 +1,4 @@
-/*      $NetBSD: scheduler.c,v 1.17 2010/07/11 16:20:39 pooka Exp $	*/
+/*      $NetBSD: scheduler.c,v 1.18 2010/08/15 20:23:04 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scheduler.c,v 1.17 2010/07/11 16:20:39 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scheduler.c,v 1.18 2010/08/15 20:23:04 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -317,6 +317,7 @@
  fastlane:
 	l->l_cpu = l->l_target_cpu = rcpu->rcpu_ci;
 	l->l_mutex = rcpu->rcpu_ci->ci_schedstate.spc_mutex;
+	l->l_ncsw++;
 }
 
 void

Reply via email to