Messages in this thread | | | Date | Wed, 15 Jan 2014 12:31:13 +0800 | From | Michael wang <> | Subject | Re: [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; >
| |