summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2003-06-21 02:22:47 +0000
committerjeff <jeff@FreeBSD.org>2003-06-21 02:22:47 +0000
commit522f0d5e1553fbdc9993b2e9dd5011ff82d06b16 (patch)
treed07bfb8a94281756d9abc715d87665a920f7023b /sys/kern
parentfb276031da6d322667a33ec5e3671a8820e261f1 (diff)
downloadFreeBSD-src-522f0d5e1553fbdc9993b2e9dd5011ff82d06b16.zip
FreeBSD-src-522f0d5e1553fbdc9993b2e9dd5011ff82d06b16.tar.gz
- Don't allow nice to have such a large effect on priority. This was
causing poor interactive performance while unnice processes were running. The new scheme still allows nice to have an effect on priority but it is not as dramatic as the effect of the interactivity score.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/sched_ule.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c
index 3932c6c..9e01ef8 100644
--- a/sys/kern/sched_ule.c
+++ b/sys/kern/sched_ule.c
@@ -124,23 +124,22 @@ struct p_sched *proc0_sched = NULL;
struct td_sched *thread0_sched = &td_sched;
/*
- * This priority range has 20 priorities on either end that are reachable
- * only through nice values.
+ * The priority is primarily determined by the interactivity score. Thus, we
+ * give lower(better) priorities to kse groups that use less CPU. The nice
+ * value is then directly added to this to allow nice to have some effect
+ * on latency.
*
* PRI_RANGE: Total priority range for timeshare threads.
- * PRI_NRESV: Reserved priorities for nice.
+ * PRI_NRESV: Number of nice values.
* PRI_BASE: The start of the dynamic range.
- * DYN_RANGE: Number of priorities that are available int the dynamic
- * priority range.
*/
#define SCHED_PRI_RANGE (PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE + 1)
#define SCHED_PRI_NRESV PRIO_TOTAL
#define SCHED_PRI_NHALF (PRIO_TOTAL / 2)
#define SCHED_PRI_NTHRESH (SCHED_PRI_NHALF - 1)
-#define SCHED_PRI_BASE ((SCHED_PRI_NRESV / 2) + PRI_MIN_TIMESHARE)
-#define SCHED_DYN_RANGE (SCHED_PRI_RANGE - SCHED_PRI_NRESV)
+#define SCHED_PRI_BASE (PRI_MIN_TIMESHARE)
#define SCHED_PRI_INTERACT(score) \
- ((score) * SCHED_DYN_RANGE / SCHED_INTERACT_MAX)
+ ((score) * SCHED_PRI_RANGE / SCHED_INTERACT_MAX)
/*
* These determine the interactivity of a process.
OpenPOWER on IntegriCloud