lkml.org 
[lkml]   [2013]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch v5 11/15] sched: add power/performance balance allow flag
On 02/20/2013 05:48 PM, Peter Zijlstra wrote:
> On Mon, 2013-02-18 at 13:07 +0800, Alex Shi wrote:
>> @@ -4053,6 +4053,8 @@ struct lb_env {
>> unsigned int loop;
>> unsigned int loop_break;
>> unsigned int loop_max;
>> + int power_lb; /* if power balance needed
>> */
>> + int perf_lb; /* if performance balance
>> needed */
>> };
>>
>> /*
>> @@ -5195,6 +5197,8 @@ static int load_balance(int this_cpu, struct rq
>> *this_rq,
>> .idle = idle,
>> .loop_break = sched_nr_migrate_break,
>> .cpus = cpus,
>> + .power_lb = 0,
>> + .perf_lb = 1,
>> };
>>
>> cpumask_copy(cpus, cpu_active_mask);
>
> This construct allows for the possibility of power_lb=1,perf_lb=1, does
> that make sense? Why not have a single balance_policy enumeration?

(power_lb == 1 && perf_lb == 1) is incorrect and impossible to have.

(power_lb == 0 && perf_lb == 0) is possible and it means there is no any
balance on this cpu.

So, enumeration is not enough.
>


--
Thanks
Alex


\
 
 \ /
  Last update: 2013-02-20 13:21    [W:0.344 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site