From 3366a508ffb6b0698dd309d1ca19a66522b886b1 Mon Sep 17 00:00:00 2001 From: Syed Rameez Mustafa Date: Tue, 13 Dec 2016 16:50:58 -0800 Subject: [PATCH] Revert "sched/cputime: Fix steal time accounting vs. CPU hotplug" This reverts commit 2a8225ef46968444fb1c4c632ec28e4cc2be633f ("sched/cputime: Fix steal time accounting vs. CPU hotplug"). The commit introduces a bug in scheduler book-keeping whereby if a CPU is hotplugged out for a small duration of time, subsequent time spent executing tasks gets mis-attributed to interrupts. This in turn results in unfair scheduling whereby a task can keep executing for a very long time without any update to it's vruntime. This revert has no side effects for msm based systems. Change-Id: Ibb506824c4223551bceb449594ac99f9dfd8064b Signed-off-by: Syed Rameez Mustafa --- kernel/sched/core.c | 1 - kernel/sched/sched.h | 13 ------------- 2 files changed, 14 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index ee708909dc17..307f430e5bd5 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -6066,7 +6066,6 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu) set_window_start(rq); raw_spin_unlock_irqrestore(&rq->lock, flags); rq->calc_load_update = calc_load_update; - account_reset_rq(rq); break; case CPU_ONLINE: diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index f569c6fe3cbb..6f8123ca878b 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -2534,16 +2534,3 @@ static inline u64 irq_time_read(int cpu) } #endif /* CONFIG_64BIT */ #endif /* CONFIG_IRQ_TIME_ACCOUNTING */ - -static inline void account_reset_rq(struct rq *rq) -{ -#ifdef CONFIG_IRQ_TIME_ACCOUNTING - rq->prev_irq_time = 0; -#endif -#ifdef CONFIG_PARAVIRT - rq->prev_steal_time = 0; -#endif -#ifdef CONFIG_PARAVIRT_TIME_ACCOUNTING - rq->prev_steal_time_rq = 0; -#endif -}