[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130220121256.GD16775@pd.tnic>
Date: Wed, 20 Feb 2013 13:12:56 +0100
From: Borislav Petkov <bp@...en8.de>
To: Alex Shi <alex.shi@...el.com>
Cc: torvalds@...ux-foundation.org, mingo@...hat.com,
peterz@...radead.org, tglx@...utronix.de,
akpm@...ux-foundation.org, arjan@...ux.intel.com, pjt@...gle.com,
namhyung@...nel.org, efault@....de, vincent.guittot@...aro.org,
gregkh@...uxfoundation.org, preeti@...ux.vnet.ibm.com,
viresh.kumar@...aro.org, linux-kernel@...r.kernel.org,
morten.rasmussen@....com
Subject: Re: [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@...el.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.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists