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 Mon, Feb 18, 2013 at 01:07:38PM +0800, Alex Shi wrote:
> If a sched domain is idle enough for regular power balance, power_lb
> will be set, perf_lb will be clean. If a sched domain is busy,
> their value will be set oppositely.
>
> If the domain is suitable for power balance, but balance should not
> be down by this cpu(this cpu is already idle or full), both of perf_lb
> and power_lb are cleared to wait a suitable cpu to do power balance.
> That mean no any balance, neither power balance nor performance balance
> will be done on this cpu.
>
> Above logical will be implemented by incoming patches.
>
> Signed-off-by: Alex Shi <alex.shi@intel.com>
> ---
> kernel/sched/fair.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 2e8131d..0047856 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -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 */

Those look like they're used like simple boolean flags. Why not make
them such, i.e. bitfields? See struct perf_event_attr for an example.

Thanks.

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--


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