diff options
author | 2022-08-25 14:27:24 +0200 | |
---|---|---|
committer | 2022-09-15 16:13:51 +0200 | |
commit | c59862f8265f8060b6650ee1dc12159fe5c89779 (patch) | |
tree | 6fe5febd84cbd2b3b1a9bee929b9e94c7d67160f /kernel/sched/core.c | |
parent | sched/fair: Make sure to try to detach at least one movable task (diff) | |
download | linux-c59862f8265f8060b6650ee1dc12159fe5c89779.tar.gz linux-c59862f8265f8060b6650ee1dc12159fe5c89779.tar.bz2 linux-c59862f8265f8060b6650ee1dc12159fe5c89779.zip |
sched/fair: Cleanup loop_max and loop_break
sched_nr_migrate_break is set to a fix value and never changes so we can
replace it by a define SCHED_NR_MIGRATE_BREAK.
Also, we adjust SCHED_NR_MIGRATE_BREAK to be aligned with the init value
of sysctl_sched_nr_migrate which can be init to different values.
Then, use SCHED_NR_MIGRATE_BREAK to init sysctl_sched_nr_migrate.
The behavior stays unchanged unless you modify sysctl_sched_nr_migrate
trough debugfs.
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20220825122726.20819-3-vincent.guittot@linaro.org
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r-- | kernel/sched/core.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 2b85d1b5fe0c..4fa4a3ddb4f4 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -142,11 +142,7 @@ __read_mostly int sysctl_resched_latency_warn_once = 1; * Number of tasks to iterate in a single balance run. * Limited because this is done with IRQs disabled. */ -#ifdef CONFIG_PREEMPT_RT -const_debug unsigned int sysctl_sched_nr_migrate = 8; -#else -const_debug unsigned int sysctl_sched_nr_migrate = 32; -#endif +const_debug unsigned int sysctl_sched_nr_migrate = SCHED_NR_MIGRATE_BREAK; __read_mostly int scheduler_running; |