summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2003-12-20 22:35:20 +0000
committerjeff <jeff@FreeBSD.org>2003-12-20 22:35:20 +0000
commiteac1e55accbbb503beca5816d6b6a80bdb5f2461 (patch)
treea0e55638008273146bda11c3c5116d87a036e1cb /sys
parentd4f3760df19ca22711e6d66761829690968394e0 (diff)
downloadFreeBSD-src-eac1e55accbbb503beca5816d6b6a80bdb5f2461.zip
FreeBSD-src-eac1e55accbbb503beca5816d6b6a80bdb5f2461.tar.gz
- Make our transfer decisions based on load and not transferable load. A
cpu could have been bogged down with non-transferable load and still not migrated a new thread to an idle cpu. This required some benchmarking and tuning to get right as the comment above it suggests.
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/sched_ule.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c
index 69f36cb..15f83e2 100644
--- a/sys/kern/sched_ule.c
+++ b/sys/kern/sched_ule.c
@@ -751,13 +751,7 @@ kseq_transfer(struct kseq *kseq, struct kse *ke, int class)
* some CPUs may idle. Too low and there will be excess migration
* and context swiches.
*/
- /*
- * XXX This ksg_transferable might work better if we were checking
- * against a global group load. As it is now, this prevents us from
- * transfering a thread from a group that is potentially bogged down
- * with non transferable load.
- */
- if (ksg->ksg_transferable > ksg->ksg_cpus && kseq_idle) {
+ if (ksg->ksg_load > (ksg->ksg_cpus * 2) && kseq_idle) {
/*
* Multiple cpus could find this bit simultaneously
* but the race shouldn't be terrible.
OpenPOWER on IntegriCloud