lkml.org 
[lkml]   [2013]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch v6 10/21] sched: get rq potential maximum utilization
On 04/02/2013 10:38 PM, Vincent Guittot wrote:
>> +static unsigned int max_rq_util(int cpu)
>> > +{
>> > + struct rq *rq = cpu_rq(cpu);
>> > + unsigned int rt_util = scale_rt_util(cpu);
>> > + unsigned int cfs_util;
>> > + unsigned int nr_running;
>> > +
>> > + cfs_util = (FULL_UTIL - rt_util) > rq->util ? rq->util
>> > + : (FULL_UTIL - rt_util);
> rt_util and rq->util don't use the same computation algorithm so the
> results are hardly comparable or addable. In addition, some RT tasks
> can have impacted the rq->util, so they will be accounted in both
> side.

Thanks Vincent!

Yes, rt_util calculated with different way, but it has very similar
meaning with rq->util. So compare them make sense.

Yes, the rq->util and rt_util have some overlap, so we need to remove
the overlap part, otherwise the total utlization of this cpu will beyond
100%. that's not make sense. And since RT task always has higher
priority than cfs task, here I keep the RT utilization and yield the cfs
utilization.
>
> Vincent
>


--
Thanks Alex


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