]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.19.2/sched-fix-hrtick_start-on-up.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.19.2 / sched-fix-hrtick_start-on-up.patch
1 From 868933359a3bdda25b562e9d41bce7071edc1b08 Mon Sep 17 00:00:00 2001
2 From: Wanpeng Li <wanpeng.li@linux.intel.com>
3 Date: Wed, 26 Nov 2014 08:44:06 +0800
4 Subject: sched: Fix hrtick_start() on UP
5
6 From: Wanpeng Li <wanpeng.li@linux.intel.com>
7
8 commit 868933359a3bdda25b562e9d41bce7071edc1b08 upstream.
9
10 The commit 177ef2a6315e ("sched/deadline: Fix a precision problem in
11 the microseconds range") forgot to change the UP version of
12 hrtick_start(), do so now.
13
14 Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
15 Fixes: 177ef2a6315e ("sched/deadline: Fix a precision problem in the microseconds range")
16 [ Fixed the changelog. ]
17 Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
18 Cc: Juri Lelli <juri.lelli@arm.com>
19 Cc: Kirill Tkhai <ktkhai@parallels.com>
20 Cc: Linus Torvalds <torvalds@linux-foundation.org>
21 Link: http://lkml.kernel.org/r/1416962647-76792-7-git-send-email-wanpeng.li@linux.intel.com
22 Signed-off-by: Ingo Molnar <mingo@kernel.org>
23 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24
25 ---
26 kernel/sched/core.c | 5 +++++
27 1 file changed, 5 insertions(+)
28
29 --- a/kernel/sched/core.c
30 +++ b/kernel/sched/core.c
31 @@ -490,6 +490,11 @@ static __init void init_hrtick(void)
32 */
33 void hrtick_start(struct rq *rq, u64 delay)
34 {
35 + /*
36 + * Don't schedule slices shorter than 10000ns, that just
37 + * doesn't make sense. Rely on vruntime for fairness.
38 + */
39 + delay = max_t(u64, delay, 10000LL);
40 __hrtimer_start_range_ns(&rq->hrtick_timer, ns_to_ktime(delay), 0,
41 HRTIMER_MODE_REL_PINNED, 0);
42 }