diff options
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index cc1f81b50b82..13dd2db9fb2d 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -1087,7 +1087,7 @@ hotplug_hrtick(struct notifier_block *nfb, unsigned long action, void *hcpu) | |||
1087 | return NOTIFY_DONE; | 1087 | return NOTIFY_DONE; |
1088 | } | 1088 | } |
1089 | 1089 | ||
1090 | static void init_hrtick(void) | 1090 | static __init void init_hrtick(void) |
1091 | { | 1091 | { |
1092 | hotcpu_notifier(hotplug_hrtick, 0); | 1092 | hotcpu_notifier(hotplug_hrtick, 0); |
1093 | } | 1093 | } |
@@ -8909,6 +8909,9 @@ static int sched_rt_global_constraints(void) | |||
8909 | u64 rt_runtime, rt_period; | 8909 | u64 rt_runtime, rt_period; |
8910 | int ret = 0; | 8910 | int ret = 0; |
8911 | 8911 | ||
8912 | if (sysctl_sched_rt_period <= 0) | ||
8913 | return -EINVAL; | ||
8914 | |||
8912 | rt_period = ktime_to_ns(tg->rt_bandwidth.rt_period); | 8915 | rt_period = ktime_to_ns(tg->rt_bandwidth.rt_period); |
8913 | rt_runtime = tg->rt_bandwidth.rt_runtime; | 8916 | rt_runtime = tg->rt_bandwidth.rt_runtime; |
8914 | 8917 | ||
@@ -8925,6 +8928,9 @@ static int sched_rt_global_constraints(void) | |||
8925 | unsigned long flags; | 8928 | unsigned long flags; |
8926 | int i; | 8929 | int i; |
8927 | 8930 | ||
8931 | if (sysctl_sched_rt_period <= 0) | ||
8932 | return -EINVAL; | ||
8933 | |||
8928 | spin_lock_irqsave(&def_rt_bandwidth.rt_runtime_lock, flags); | 8934 | spin_lock_irqsave(&def_rt_bandwidth.rt_runtime_lock, flags); |
8929 | for_each_possible_cpu(i) { | 8935 | for_each_possible_cpu(i) { |
8930 | struct rt_rq *rt_rq = &cpu_rq(i)->rt; | 8936 | struct rt_rq *rt_rq = &cpu_rq(i)->rt; |