From cb8206ddb0aebb7b0c3fc1028169b4203fa165ad Mon Sep 17 00:00:00 2001 From: Lingutla Chandrasekhar Date: Mon, 11 May 2020 12:48:50 +0530 Subject: [PATCH] Revert "sched: reduce sleep duration in wait_task_inactive()" Upstream commit '26c7295be0c5e("kthread: Do not preempt current task if it is going to call schedule()")' makes parent thread to not call wait_task_inactive(child) on kthread create completion, which intern avoids calling schedule_hrtimeout() and reduce bootup latencies. The commit 'a9e87164b8984(sched: reduce sleep duration in wait_task_inactive())' reduces wait time to 1msec to avoid bootup latencies. Which can be reverted now. Change-Id: I4b2fd0abe5a264f4d662bdeab4160d1977ef6c22 Signed-off-by: Lingutla Chandrasekhar --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index aca985f751b0..8c3a2d7dcf4e 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -2008,7 +2008,7 @@ unsigned long wait_task_inactive(struct task_struct *p, long match_state) * yield - it could be a while. */ if (unlikely(queued)) { - ktime_t to = NSEC_PER_MSEC; + ktime_t to = NSEC_PER_SEC / HZ; set_current_state(TASK_UNINTERRUPTIBLE); schedule_hrtimeout(&to, HRTIMER_MODE_REL);