scheduler fix
Linus,
Please pull the latest sched-urgent-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched-urgent-for-linus
# HEAD: a860fa7b96e1a1c974556327aa1aee852d434c21 sched/numa: Fix a possible divide-by-zero
Fix a division by zero bug that can trigger in the NUMA placement code.
Thanks,
Ingo
------------------>
Xie XiuQi (1):
sched/numa: Fix a possible divide-by-zero
kernel/sched/fair.c | 4 ++++ 1 file changed, 4 insertions(+)
kernel/sched/fair.c +4 -0
@@ -2007,6 +2007,10 @@ static u64 numa_get_avg_runtime(struct task_struct *p, u64 *period)if (p->last_task_numa_placement) { delta = runtime - p->last_sum_exec_runtime; *period = now - p->last_task_numa_placement; + +/* Avoid time going backwards, prevent potential divide error: */ +if (unlikely ((s64)*period <0 )) + *period =0 ; }else { delta = p->se.avg.load_sum; *period =LOAD_AVG_MAX ;
The pull request you sent on Sat, 27 Apr 2019 16:39:26 +0200:
The pull request you sent on Sat, 27 Apr 2019 16:39:26 +0200:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gitsched-urgent-for-linus
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/15d4e26b816a39f2d1ba40bacb8e8ecf8884477c
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/prtracker