Jetpack/kernel/kernel-4.9/rt-patches/0130-sched-Limit-the-number...

33 lines
1011 B
Diff

From 01856635bb5753093014512e621834a3b13ab9a1 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Mon, 6 Jun 2011 12:12:51 +0200
Subject: [PATCH 130/352] sched: Limit the number of task migrations per batch
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>
---
kernel/sched/core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 64ac7a2..412542f 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -132,7 +132,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
--
2.7.4