Re: Native preemption is the culprit [was Re: today's CURRENT lockups]

From: Robert Watson <rwatson_at_freebsd.org>
Date: Tue, 6 Jul 2004 00:14:21 -0400 (EDT)
(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_at_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
_at__at_ -1623,6 +1623,7 _at__at_
         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
_at__at_ -1632,6 +1633,7 _at__at_
 #endif
 	if (maybe_preempt(td))
 		return;
+#endif
 	ke->ke_ksegrp->kg_runq_kses++;
 	ke->ke_state = KES_ONRUNQ;
 
Received on Tue Jul 06 2004 - 02:15:00 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:00 UTC