kernel: reduce sleep duration in wait_task_inactive

Sleeping for an entire tick adds unnecessary latency to
hotplugging a cpu (cpu_up).

Change-Id: Iab323a79f4048bc9101ecfd368e0f275827ed4ab
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
[rameezmustafa@codeaurora.org]: Port to msm-3.18]
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
This commit is contained in:
Steve Muckle 2018-02-26 21:24:04 +01:00 committed by BlackMesa123
parent b445a87e48
commit c58d88ce97

View File

@ -1517,7 +1517,7 @@ unsigned long wait_task_inactive(struct task_struct *p, long match_state)
* yield - it could be a while. * yield - it could be a while.
*/ */
if (unlikely(queued)) { if (unlikely(queued)) {
ktime_t to = ktime_set(0, NSEC_PER_SEC/HZ); ktime_t to = ktime_set(0, NSEC_PER_MSEC);
set_current_state(TASK_UNINTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_hrtimeout(&to, HRTIMER_MODE_REL); schedule_hrtimeout(&to, HRTIMER_MODE_REL);