lkml.org 
[lkml]   [2013]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2013-04-03 08:01    [W:0.271 / U:1.820 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site