lkml.org 
[lkml]   [2014]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] sched: find the latest idle cpu
Hi, Alex

On 01/15/2014 12:07 PM, Alex Shi wrote:
[snip] }
> +#ifdef CONFIG_NO_HZ_COMMON
> + /*
> + * Coarsely to get the latest idle cpu for shorter latency and
> + * possible power benefit.
> + */
> + if (!min_load) {
> + struct tick_sched *ts = &per_cpu(tick_cpu_sched, i);
> +
> + s64 latest_wake = 0;

I guess we missed some code for latest_wake here?

Regards,
Michael Wang

> + /* idle cpu doing irq */
> + if (ts->inidle && !ts->idle_active)
> + idlest = i;
> + /* the cpu resched */
> + else if (!ts->inidle)
> + idlest = i;
> + /* find latest idle cpu */
> + else if (ktime_to_us(ts->idle_entrytime) > latest_wake)
> + idlest = i;
> + }
> +#endif
> }
>
> return idlest;
>



\
 
 \ /
  Last update: 2014-01-15 06:21    [W:0.088 / U:2.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site