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 Increment lwp's context switch cou...



details:   https://anonhg.NetBSD.org/src/rev/a1d3df0cd92a
branches:  trunk
changeset: 757127:a1d3df0cd92a
user:      pooka <pooka%NetBSD.org@localhost>
date:      Sun Aug 15 20:23:04 2010 +0000

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

diffstat:

 sys/rump/librump/rumpkern/scheduler.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 031889b79084 -r a1d3df0cd92a sys/rump/librump/rumpkern/scheduler.c
--- a/sys/rump/librump/rumpkern/scheduler.c     Sun Aug 15 19:43:03 2010 +0000
+++ b/sys/rump/librump/rumpkern/scheduler.c     Sun Aug 15 20:23:04 2010 +0000
@@ -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



Home | Main Index | Thread Index | Old Index