[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1358996820-23036-15-git-send-email-alex.shi@intel.com>
Date: Thu, 24 Jan 2013 11:06:56 +0800
From: Alex Shi <alex.shi@...el.com>
To: torvalds@...ux-foundation.org, mingo@...hat.com,
peterz@...radead.org, tglx@...utronix.de,
akpm@...ux-foundation.org, arjan@...ux.intel.com, bp@...en8.de,
pjt@...gle.com, namhyung@...nel.org, efault@....de
Cc: vincent.guittot@...aro.org, gregkh@...uxfoundation.org,
preeti@...ux.vnet.ibm.com, viresh.kumar@...aro.org,
linux-kernel@...r.kernel.org, alex.shi@...el.com
Subject: [patch v4 14/18] sched: add power/performance balance allowed flag
If a sched domain is idle enough for 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, 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 the balance cpu.
Above logical will be implemented by following 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 eede065..19624f4 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4039,6 +4039,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 */
};
/*
@@ -5180,6 +5182,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);
--
1.7.12
--
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