aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-06-06 12:12:51 +0200
committerAlex Shi <alex.shi@linaro.org>2017-12-14 10:13:32 +0800
commit80afdfbac6825c6a34c548f426920a969df0e010 (patch)
treea5e374d67a38425ecff7f2f019410452984ed9e7
parent920c6ebca50c98eb0565a0d32c7b0405dd1d311c (diff)
downloadlinux-linaro-stable-linux-linaro-lsk-v4.14-rt-test.tar.gz
sched: Limit the number of task migrations per batchlinux-linaro-lsk-v4.14-rt-test
Put an upper limit on the number of tasks which are migrated per batch to avoid large latencies. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> (cherry picked from commit 6c6a9fafeb1ec04ee2a4d64f2a6bae3be3ad0151) Signed-off-by: Alex Shi <alex.shi@linaro.org> (cherry picked from commit d8b520462cd355455350e551322769737be7d46c) Signed-off-by: Alex Shi <alex.shi@linaro.org>
-rw-r--r--kernel/sched/core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index da8ff1a..ec1758f 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -64,7 +64,11 @@ const_debug unsigned int sysctl_sched_features =
* Number of tasks to iterate in a single balance run.
* Limited because this is done with IRQs disabled.
*/
+#ifndef CONFIG_PREEMPT_RT_FULL
const_debug unsigned int sysctl_sched_nr_migrate = 32;
+#else
+const_debug unsigned int sysctl_sched_nr_migrate = 8;
+#endif
/*
* period over which we average the RT time consumption, measured