need_active_balance uses env->src_cpu which is set only if there is more
than 1 task on the run queue. We must set the src_cpu field unconditionnally
otherwise the test "env->src_cpu > env->dst_cpu" will always fail if there is
only 1 task on the run queue
Signed-off-by: Vincent Guittot <vincent.guittot(a)linaro.org>
---
kernel/sched/fair.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 81fa536..32938ea 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5044,6 +5044,10 @@ redo:
ld_moved = 0;
lb_iterations = 1;
+
+ env.src_cpu = busiest->cpu;
+ env.src_rq = busiest;
+
if (busiest->nr_running > 1) {
/*
* Attempt to move tasks. If find_busiest_group has found
@@ -5052,8 +5056,6 @@ redo:
* correctly treated as an imbalance.
*/
env.flags |= LBF_ALL_PINNED;
- env.src_cpu = busiest->cpu;
- env.src_rq = busiest;
env.loop_max = min(sysctl_sched_nr_migrate, busiest->nr_running);
update_h_load(env.src_cpu);
--
1.7.9.5
Calendar Week 7, 2013: Here is test result summary for Linux Linaro ubuntu
Quantal image on following boards:
1) ARM Versatile Express A9;
2) Samsung Arndale;
3) TI Panda 4430;
4) TI Panda 4460;
5) ST Ericsson Snowball.
Synopsis: All boards keep exactly same status as last week, except Samsung
Arndale. Device Tree is only available on Samsung Arndale.
1. ARM Versatile Express A9 + Linux Linaro Quantal (Column K):
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AroPySpr4FnEdFNmV…
It keeps exactly same status from calendar 50 last year: only "Halt" &
"Device Tree" test failed, all other features work well.
2. Samsung Arndale + Linux Linaro Quantal (Column E):
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AgB-fT5LL31CdGZJS…
Ethernet failed this week, and it blocked ARM DS-5 and Power Management
test. No display via HDMI interface. Other features work well.
3. TI Panda 4430 + Linux Linaro Quantal (Column K):
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AroPySpr4FnEdEwwZ…
It keeps exactly same status as last week: only Device Tree is unavailable.
4. TI Panda 4460 + Linux Linaro Quantal (Column K):
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AroPySpr4FnEdEwwZ…
It keeps exactly same status as last week: only Device Tree is unavailable.
5. ST Ericsson Snowball + Linux Linaro Quantal (Column K):
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AroPySpr4FnEdFJ4X…
It keeps exactly same status as last week: no Ethernet, HDMI display,
Device Tree, "Reboot" failed, and Power Management test will cause Kernel
Panic. Also, ARM DS-5 is blocked because no network connection available.
For the previous week test summary (Calendar Week 6), please refer to
attachment.
Thank you.
Best Regards
Botao Sun
On 02/13/2013 10:44 AM, Olivier Martin wrote:
> Instead of using:
> #if !defined(MDEPKG_NDEBUG)
> (...)
> #endif
>
> It would be better to use:
> DEBUG_CODE_BEGIN();
> (...)
> DEBUG_CODE_END();
>
> The reason is you can be in debug build and disable debug code (and/or
> disable other things such as ASSERT). See definition of PcdDebugPropertyMask
> for the full list of debug properties.
These macros insert code which would place the variable definition
inside an "if" statement. This usage violates the Coding Standard on
page 30:
"The data declarations must be the first code in a module."
"Data declarations appearing anywhere but at the beginning of the
module are illegal."
> The EDK2 coding convention
> (http://sourceforge.net/projects/edk2/files/General%20Documentation/EDK%20II
> %20C%20Coding%20Standards%20Specification.pdf/download) says we should not
> write this kind of variable declaration:
> EFI_STATUS Status = EFI_INVALID_PARAMETER;
>
> See page 30: "Initializing a variable as part of its declaration is
> illegal."
This restriction is violated in almost every case in the files I
patched. I merely coded my changes to blend in with the surrounding
code, as any good maintenance programmer would do.
The coding standard's requirement is, in this case, contrary to commonly
accepted coding practice in the industry for the last decade. It really
should be removed from the DRAFT standard.
The mandatory space between the function name and the opening paren of
its argument list needs to go away too: the vast majority of the
programmers I've spoken with read that as missing a binary operator
between a variable and a parenthized expression. They have to re-read
the code several times before it becomes apparent that this is a
function call and not a coding error. The existence of documented
exceptions (macro definitions, etc.) support the argument that it's a
bad practice.
Feel free to change the patch as you see fit. I never expected to
publish these changes; they were intended only to help me figure out why
I couldn't build a standard target in my development environment. Ryan
asked for copies so I provided them.
-Reece
When a RT task is scheduled on an idle CPU, the update of the rq's load is
not done because CFS's functions are not called. Then, the idle_balance,
which is called just before entering the idle function, updates the
rq's load and makes the assumption that the elapsed time since the last
update, was only running time.
The rq's load of a CPU that only runs a periodic RT task, is close to
LOAD_AVG_MAX whatever the running duration of the RT task is.
A new idle_exit function is called when the prev task is the idle function
so the elapsed time will be accounted as idle time in the rq's load.
Changes since V2:
- remove useless definition for UP platform
- rebased on top of Steven Rostedt's patches :
https://lkml.org/lkml/2013/2/12/558
Changes since V1:
- move code out of schedule function and create a pre_schedule callback for
idle class instead.
Signed-off-by: Vincent Guittot <vincent.guittot(a)linaro.org>
---
kernel/sched/fair.c | 10 ++++++++++
kernel/sched/idle_task.c | 7 +++++++
kernel/sched/sched.h | 1 +
3 files changed, 18 insertions(+)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 0fcdbff..6af5db3 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1562,6 +1562,16 @@ static inline void dequeue_entity_load_avg(struct cfs_rq *cfs_rq,
se->avg.decay_count = atomic64_read(&cfs_rq->decay_counter);
} /* migrations, e.g. sleep=0 leave decay_count == 0 */
}
+
+/*
+ * Update the rq's load with the elapsed idle time before a task is
+ * scheduled. if the newly scheduled task is not a CFS task, idle_exit will
+ * be the only way to update the runnable statistic.
+ */
+void idle_exit(int this_cpu, struct rq *this_rq)
+{
+ update_rq_runnable_avg(this_rq, 0);
+}
#else
static inline void update_entity_load_avg(struct sched_entity *se,
int update_cfs_rq) {}
diff --git a/kernel/sched/idle_task.c b/kernel/sched/idle_task.c
index 66b5220..6e7e63c 100644
--- a/kernel/sched/idle_task.c
+++ b/kernel/sched/idle_task.c
@@ -14,6 +14,12 @@ select_task_rq_idle(struct task_struct *p, int sd_flag, int flags)
return task_cpu(p); /* IDLE tasks as never migrated */
}
+static void pre_schedule_idle(struct rq *rq, struct task_struct *prev)
+{
+ /* Update rq's load with elapsed idle time */
+ idle_exit(smp_processor_id(), rq);
+}
+
static void post_schedule_idle(struct rq *rq)
{
idle_balance(smp_processor_id(), rq);
@@ -95,6 +101,7 @@ const struct sched_class idle_sched_class = {
#ifdef CONFIG_SMP
.select_task_rq = select_task_rq_idle,
+ .pre_schedule = pre_schedule_idle,
.post_schedule = post_schedule_idle,
#endif
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index fc88644..5f26c93f 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -877,6 +877,7 @@ extern const struct sched_class idle_sched_class;
extern void trigger_load_balance(struct rq *rq, int cpu);
extern void idle_balance(int this_cpu, struct rq *this_rq);
+extern void idle_exit(int this_cpu, struct rq *this_rq);
#else /* CONFIG_SMP */
--
1.7.9.5
https://wiki.linaro.org/projects/big.LITTLE.MP
Work Items for functional completion:
https://wiki.linaro.org/projects/big.LITTLE.MP/WorkItems
Roadmap Cards:
Improving HMP Linux scheduling - http://cards.linaro.org/browse/CARD-190
Blueprints and bugs are all now in a single Launchpad project for big.LITTLE:
https://launchpad.net/linaro-big-little-system
Items upcoming in the version 15 push:
=================================
Pack the small tasks on LITTLE cluster
Fix the nr_busy_cpus to prevent spurious Idle Load Balance
Use the "per task load average tracking" in all the scheduler and take
also into account the blocked load of a core during the load
balancing. We want to take into account the small tasks loads which
often sleep during the load balance sequence (accumulated in the
blocked load)
Ensure that the small tasks will not be chosen during the periodic
load balance. The main concept is that PST will take care of small
tasks and the periodic load balance will ensure that the tasks with
highest load will run on cores with highest capacity.
Force the migration of a task to a core with higher capacity if the
current one is overloaded
Tune the sched_domain for a big.LITTLE platform. We are disabling the
newly idle load balance between clusters because the little cores
generates a lot of newly idle load balance and tends to pull heavy
tasks from big cluster. It's a bit less obvious for the wake affine
flag because it's sometimes help and it sometimes doesn't...
QA
===
big.LITTLE MP LAVA Dashboard
http://validation.linaro.org/lava-server/dashboard/image-reports/linaro-and…
Testing:
http://lists.linaro.org/pipermail/linaro-dev/2013-February/015318.html
Bugs:
https://bugs.launchpad.net/linaro-big-little-system/+bug/1112116:
- Workaround exists
https://bugs.launchpad.net/linaro-big-little-system/+bug/1087149:
- Complicated and being investigated.
--
David Zinman, Project Manager
Linaro.org | Open source software for ARM SoCs
I was looking for the OpenCL SDK for Omap 4xxx, For the panda es
preferred I guess.
I've seen references that in order to obtain access to it that one
needs some sort of agreement in place with TI & Imagination.
>From a Linaro standpoint do we have this? Do we know who to contact?
Thanks!
--
Regards,
Tom
"Where's the kaboom!? There was supposed to be an earth-shattering
kaboom!" Marvin Martian
Tech Lead, Graphics Working Group | Linaro.org │ Open source software
for ARM SoCs
w) tom.gall att linaro.org
h) tom_gall att mac.com
Hi,
I noticed that there are hwpacks for arndale showing up on snapshots.
linaro-media-create however doesn't support arndale. I looked in
launchpad but the linaro-image-tools bzr repo hasn't been updated
since last fall and I didn't see any branched that might include
development of arndale support.
I'd really like to be running alip on arndale if possible. Is there
dev branch around with something that might be a WIP for arndale?
Thanks!
--
Regards,
Tom
"Where's the kaboom!? There was supposed to be an earth-shattering
kaboom!" Marvin Martian
Tech Lead, Graphics Working Group | Linaro.org │ Open source software
for ARM SoCs
w) tom.gall att linaro.org
h) tom_gall att mac.com
When a RT task is scheduled on an idle CPU, the update of the rq's load is
not done because CFS's functions are not called. Then, the idle_balance,
which is called just before entering the idle function, updates the
rq's load and makes the assumption that the elapsed time since the last
update, was only running time.
The rq's load of a CPU that only runs a periodic RT task, is close to
LOAD_AVG_MAX whatever the running duration of the RT task is.
A new idle_exit function is called when the prev task is the idle function
so the elapsed time will be accounted as idle time in the rq's load.
Changes since V1:
- move code out of schedule function and create a pre_schedule callback for
idle class instead.
Signed-off-by: Vincent Guittot <vincent.guittot(a)linaro.org>
---
kernel/sched/fair.c | 10 ++++++++++
kernel/sched/idle_task.c | 7 +++++++
kernel/sched/sched.h | 5 +++++
3 files changed, 22 insertions(+)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 81fa536..60951f1 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1562,6 +1562,16 @@ static inline void dequeue_entity_load_avg(struct cfs_rq *cfs_rq,
se->avg.decay_count = atomic64_read(&cfs_rq->decay_counter);
} /* migrations, e.g. sleep=0 leave decay_count == 0 */
}
+
+/*
+ * Update the rq's load with the elapsed idle time before a task is
+ * scheduled. if the newly scheduled task is not a CFS task, idle_exit will
+ * be the only way to update the runnable statistic.
+ */
+void idle_exit(int this_cpu, struct rq *this_rq)
+{
+ update_rq_runnable_avg(this_rq, 0);
+}
#else
static inline void update_entity_load_avg(struct sched_entity *se,
int update_cfs_rq) {}
diff --git a/kernel/sched/idle_task.c b/kernel/sched/idle_task.c
index b6baf37..27cd379 100644
--- a/kernel/sched/idle_task.c
+++ b/kernel/sched/idle_task.c
@@ -13,6 +13,12 @@ select_task_rq_idle(struct task_struct *p, int sd_flag, int flags)
{
return task_cpu(p); /* IDLE tasks as never migrated */
}
+
+static void pre_schedule_idle(struct rq *rq, struct task_struct *prev)
+{
+ /* Update rq's load with elapsed idle time */
+ idle_exit(smp_processor_id(), rq);
+}
#endif /* CONFIG_SMP */
/*
* Idle tasks are unconditionally rescheduled:
@@ -86,6 +92,7 @@ const struct sched_class idle_sched_class = {
#ifdef CONFIG_SMP
.select_task_rq = select_task_rq_idle,
+ .pre_schedule = pre_schedule_idle,
#endif
.set_curr_task = set_curr_task_idle,
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index fc88644..9707092 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -877,6 +877,7 @@ extern const struct sched_class idle_sched_class;
extern void trigger_load_balance(struct rq *rq, int cpu);
extern void idle_balance(int this_cpu, struct rq *this_rq);
+extern void idle_exit(int this_cpu, struct rq *this_rq);
#else /* CONFIG_SMP */
@@ -884,6 +885,10 @@ static inline void idle_balance(int cpu, struct rq *rq)
{
}
+static inline void idle_exit(int this_cpu, struct rq *this_rq)
+{
+}
+
#endif
extern void sysrq_sched_debug_show(void);
--
1.7.9.5
http://www.phoronix.com/scan.php?page=news_item&px=MTI5OTM
just sayin.. linaro has the right people w/ toolchain and neon
expertise. We may be getting closer to the point of viable opensrc 3d
drivers, but having a decent fallback when no opensrc 3d driver and no
blob driver is available still seems like a good thing. And I bet you
it could run circles around android's sw gles implementation.
BR,
-R