From 5273b0bf9faa803d4d586ba6d8c03c9d340e85c9 Mon Sep 17 00:00:00 2001 From: ups Date: Fri, 10 Jun 2005 03:00:29 +0000 Subject: [PATCH] Restore preemption of idle threads. Submitted by: jhb --- sys/kern/kern_switch.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/kern/kern_switch.c b/sys/kern/kern_switch.c index f1fb42710c1d..498d98cf1219 100644 --- a/sys/kern/kern_switch.c +++ b/sys/kern/kern_switch.c @@ -675,11 +675,9 @@ maybe_preempt(struct thread *td) TD_IS_INHIBITED(ctd) || td->td_kse->ke_state != KES_THREAD) return (0); #ifndef FULL_PREEMPTION - if (pri > PRI_MAX_ITHD) + if (pri > PRI_MAX_ITHD && cpri < PRI_MIN_IDLE) return (0); #endif - if (cpri >= PRI_MIN_IDLE) - return (0); if (ctd->td_critnest > 1) { CTR1(KTR_PROC, "maybe_preempt: in critical section %d",