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:
parent
b445a87e48
commit
c58d88ce97
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user