summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2005-09-22 01:19:37 +0000
committerdavidxu <davidxu@FreeBSD.org>2005-09-22 01:19:37 +0000
commitebee9317bd3b20e097fab8800f06e1bc325292ad (patch)
treef300ee2f2eade53957d388231522e02b1e40b360 /sys
parent3ed227bac68eebc063f639d3bb82d7d449c27bb0 (diff)
downloadFreeBSD-src-ebee9317bd3b20e097fab8800f06e1bc325292ad.zip
FreeBSD-src-ebee9317bd3b20e097fab8800f06e1bc325292ad.tar.gz
Temporarily disable nice threshold detection code, as it can starve
a thread holding critical resource, e.g mutex or other implicit synchronous flags. Give thread which exceeds nice threshold a minimum time slice. PR: kern/86087
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/sched_ule.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c
index 1eb302e..e5fe68a 100644
--- a/sys/kern/sched_ule.c
+++ b/sys/kern/sched_ule.c
@@ -886,6 +886,7 @@ kseq_choose(struct kseq *kseq)
* of the range that receives slices.
*/
nice = ke->ke_proc->p_nice + (0 - kseq->ksq_nicemin);
+#if 0
if (ke->ke_slice == 0 || (nice > SCHED_SLICE_NTHRESH &&
ke->ke_proc->p_nice != 0)) {
runq_remove(ke->ke_runq, ke);
@@ -894,6 +895,7 @@ kseq_choose(struct kseq *kseq)
runq_add(ke->ke_runq, ke, 0);
continue;
}
+#endif
return (ke);
}
@@ -1088,7 +1090,7 @@ sched_slice(struct kse *ke)
else if (kg->kg_proc->p_nice == 0)
ke->ke_slice = SCHED_SLICE_MIN;
else
- ke->ke_slice = 0;
+ ke->ke_slice = SCHED_SLICE_MIN; /* 0 */
} else
ke->ke_slice = SCHED_SLICE_INTERACTIVE;
OpenPOWER on IntegriCloud