From owner-freebsd-current@FreeBSD.ORG Tue Jul 6 04:15:00 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 71AC416A4CE; Tue, 6 Jul 2004 04:15:00 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2442843D31; Tue, 6 Jul 2004 04:15:00 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.11/8.12.11) with ESMTP id i664ELFo062866; Tue, 6 Jul 2004 00:14:21 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i664ELE5062862; Tue, 6 Jul 2004 00:14:21 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Tue, 6 Jul 2004 00:14:21 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Thorsten Greiner In-Reply-To: <20040705184940.GA2651@tybalt.greiner.local> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: "Michael L. Hostbaek" cc: Bosko Milekic cc: Gleb Smirnoff cc: current@freebsd.org Subject: Re: Native preemption is the culprit [was Re: today's CURRENT lockups] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jul 2004 04:15:00 -0000 (This time to more people) The patch below appears to (brute force) eliminate the crash/hang I'm experiencing with SCHED_ULE in the post-preemption universe. However, I was experiencing it only in the SMP case, not UP, so it could be I'm just not triggering it timing-wise. This would be a temporary fix until jhb is online again post-USENIX to take a look, assuming this works around the problem for people other than me. Note that this is probably damaging to interrupt processing latency. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Principal Research Scientist, McAfee Research Index: sched_ule.c =================================================================== RCS file: /data/ncvs/src/sys/kern/sched_ule.c,v retrieving revision 1.112 diff -u -r1.112 sched_ule.c --- sched_ule.c 3 Jul 2004 16:57:51 -0000 1.112 +++ sched_ule.c 6 Jul 2004 02:52:18 -0000 @@ -1623,6 +1623,7 @@ if (td->td_priority < curthread->td_priority) curthread->td_flags |= TDF_NEEDRESCHED; +#if 0 #ifdef SMP /* * Only try to preempt if the thread is unpinned or pinned to the @@ -1632,6 +1633,7 @@ #endif if (maybe_preempt(td)) return; +#endif ke->ke_ksegrp->kg_runq_kses++; ke->ke_state = KES_ONRUNQ;