sched: reduce sleep duration in wait_task_inactive()

Sleeping for a second adds unnecessary latency to hotplugging a cpu
(cpu_up). Reduce the wait time down to 1 ms which is in line with
earlier kernel versions. The 1 second value was caused due to an
incorrect merge conflict resolution during kernel upgrade.

Change-Id: Ice58147fff4d9b997def823436510ce23b02eb8e
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
[satyap@codeaurora.org: trivial merge conflict resolution]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
This commit is contained in:
Syed Rameez Mustafa 2017-01-12 21:31:07 -08:00 • committed by Satya Durga Srinivasu Prabhala
commit a9e87164b8

View file

@ -1962,7 +1962,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_SEC / HZ;
ktime_t to = NSEC_PER_MSEC;
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_hrtimeout(&to, HRTIMER_MODE_REL);