Subject: kern/26108: losing ticks with MULTIPROCESSOR
To: None <gnats-bugs@gnats.netbsd.org>
From: None <yamt@mwd.biglobe.ne.jp>
List: netbsd-bugs
Date: 06/29/2004 19:27:55
>Number: 26108
>Category: kern
>Synopsis: losing ticks with MULTIPROCESSOR
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jun 29 10:39:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
>Release: NetBSD 2.0F
>Organization:
>Environment:
System: NetBSD kaeru 2.0F NetBSD 2.0F (build.kaeru) #1461: Tue Jun 29 16:56:46 JST 2004 takashi@kaeru:/home/takashi/work/kernel/build.kaeru i386
Architecture: i386
Machine: i386
>Description:
as mi_switch() attempt to reacquire kernel_lock with higher IPL
than IPL_CLOCK, ticks are frequently lost.
>How-To-Repeat:
run on a multiprocessor box without ntpd.
>Fix:
the following is a workaround.
Index: kern_synch.c
===================================================================
--- kern_synch.c (revision 717)
+++ kern_synch.c (working copy)
@@ -938,6 +938,7 @@ mi_switch(struct lwp *l, struct lwp *new
cpu_switchto(l, newl);
retval = 0;
}
+ spl0(); /* XXX */
/*
* If we are using h/w performance counters, restore context.
@@ -968,6 +969,7 @@ mi_switch(struct lwp *l, struct lwp *new
* we reacquire the interlock.
*/
KERNEL_LOCK_ACQUIRE_COUNT(hold_count);
+ (void)splsched(); /* XXX */
return retval;
}
>Release-Note:
>Audit-Trail:
>Unformatted: