Messages in this thread | | | Date | Wed, 03 Apr 2013 13:41:10 +0800 | From | Alex Shi <> | Subject | Re: [patch v6 13/21] sched: using avg_idle to detect bursty wakeup |
| |
struct rq *rq = cpu_rq(i); >> + >> + if (burst && rq->nr_running > 1) >> + /* use nr_running as instant utilization */ >> + sgs->group_util += rq->nr_running; > > I guess multiplying FULL_UTIL to rq->nr_running here will remove > special-casing the burst in is_sd_full(). Also moving this logic to > max_rq_util() looks better IMHO.
Yes, right! Thanks a lot! > >
>> + if (cpu_rq(cpu)->avg_idle < sysctl_sched_burst_threshold) >> + burst = 1; > > Sorry, I don't understand this. > > Given that sysctl_sched_burst_threshold is twice of > sysctl_sched_migration_cost which is max value of rq->avg_idle, the > avg_idle will be almost always less than the threshold, right?
In fact, lots of time we have avg_idle at the max value. so won't always have burst. > > So how does it find out the burst case? I thought it's the case of a > cpu is in idle for a while and then wakes number of tasks at once.
Yes. If > so, shouldn't it check whether the avg_idle is *longer* than certain > threshold? What am I missing?
avg_idle is smaller when many wakeup happens. update_avg() is not always increase it. > > Thanks, > Namhyung >
-- Thanks Alex
| |