Hi,
The following code fails to build with OE Aarch64 toolchain with
current kernel headers. While ugly, the code is a reduced testcase
from fuse build failure (
https://bugs.launchpad.net/linaro-oe/+bug/1087757 ) and the same fuse
code compiles on all other architectures. Before I send a workaround
for upstream, I'd like to know how we can end up with different
definitions for int64_t when that happens on no other architectures -
something wrong with the generic kernel headers?
Testcase:
#include <sys/types.h>
#define __s64 int64_t
#include <signal.h>
int main(int argc, char **argv)
{
int64_t x=4;
return x;
}
Failure:
/data/oe/build/tmp-eglibc/sysroots/x86_64-linux/usr/bin/aarch64-oe-linux/aarch64-oe-linux-gcc
-save-temps --sysroot=/data/oe/build/tmp-eglibc/sysroots/genericarmv8
-o test test.c
In file included from
/data/oe/build/tmp-eglibc/sysroots/genericarmv8/usr/include/asm-generic/types.h:7:0,
from
/data/oe/build/tmp-eglibc/sysroots/genericarmv8/usr/include/asm/types.h:1,
from
/data/oe/build/tmp-eglibc/sysroots/genericarmv8/usr/include/linux/types.h:4,
from
/data/oe/build/tmp-eglibc/sysroots/genericarmv8/usr/include/asm/sigcontext.h:19,
from
/data/oe/build/tmp-eglibc/sysroots/genericarmv8/usr/include/bits/sigcontext.h:27,
from
/data/oe/build/tmp-eglibc/sysroots/genericarmv8/usr/include/signal.h:338,
from test.c:4:
/data/oe/build/tmp-eglibc/sysroots/genericarmv8/usr/include/asm-generic/int-ll64.h:29:44:
error: conflicting types for 'int64_t'
In file included from test.c:2:0:
/data/oe/build/tmp-eglibc/sysroots/genericarmv8/usr/include/sys/types.h:197:13:
note: previous declaration of 'int64_t' was here
We are first storing the new vruntime in a variable and then storing it in
se->vruntime. Simply update se->vruntime directly.
Signed-off-by: Viresh Kumar <viresh.kumar(a)linaro.org>
---
kernel/sched/fair.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index a319d56c..820a2f1 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1454,9 +1454,7 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
}
/* ensure we never gain time by being placed backwards. */
- vruntime = max_vruntime(se->vruntime, vruntime);
-
- se->vruntime = vruntime;
+ se->vruntime = max_vruntime(se->vruntime, vruntime);
}
static void check_enqueue_throttle(struct cfs_rq *cfs_rq);
--
1.7.12.rc2.18.g61b472e
Hi,
This patchset takes advantage of the new per-task load tracking that is available in the kernel for packing the small tasks in as few as possible CPU/Cluster/Core. The main goal of packing small tasks is to reduce the power consumption by minimizing the number of power domain that are enabled. The packing is done in 2 steps:
The 1st step looks for the best place to pack tasks in a system according to its topology and it defines a pack buddy CPU for each CPU if there is one available. The policy for defining a buddy CPU is that we pack at all levels where a group of CPU can be power gated independently from others. For describing this capability, a new flag has been introduced SD_SHARE_POWERDOMAIN that is used to indicate whether the groups of CPUs of a scheduling domain are sharing their power state. By default, this flag has been set in all sched_domain in order to keep unchanged the current behavior of the scheduler.
In a 2nd step, the scheduler checks the load average of a task which wakes up as well as the load average of the buddy CPU and can decide to migrate the task on the buddy. This check is done during the wake up because small tasks tend to wake up between load balance and asynchronously to each other which prevents the default mechanism to catch and migrate them efficiently.
Change since V1:
Patch 2/6
- Change the flag name which was not clear. The new name is SD_SHARE_POWERDOMAIN.
- Create an architecture dependent function to tune the sched_domain flags
Patch 3/6
- Fix issues in the algorithm that looks for the best buddy CPU
- Use pr_debug instead of pr_info
- Fix for uniprocessor
Patch 4/6
- Remove the use of usage_avg_sum which has not been merged
Patch 5/6
- Change the way the coherency of runnable_avg_sum and runnable_avg_period is ensured
Patch 6/6
- Use the arch dependent function to set/clear SD_SHARE_POWERDOMAIN for ARM platform
New results for V2:
This series has been tested with MP3 play back on ARM platform: TC2 HMP (dual CA-15 and 3xCA-7 cluster).
The measurements have been done on an Ubuntu image during 60 seconds of playback and the result has been normalized to 100.
| CA15 | CA7 | total |
-------------------------------------
default | 81 | 97 | 178 |
pack | 13 | 100 | 113 |
-------------------------------------
Previous result for V1:
The patch-set has been tested on ARM platforms: quad CA-9 SMP and TC2 HMP (dual CA-15 and 3xCA-7 cluster). For ARM platform, the results have demonstrated that it's worth packing small tasks at all topology levels.
The performance tests have been done on both platforms with sysbench. The results don't show any performance regressions. These results are aligned with the policy which uses the normal behavior with heavy use cases.
test: sysbench --test=cpu --num-threads=N --max-requests=R run
Results below is the average duration of 3 tests on the quad CA-9.
default is the current scheduler behavior (pack buddy CPU is -1)
pack is the scheduler with the pack mechanism
| default | pack |
-----------------------------------
N=8; R=200 | 3.1999 | 3.1921 |
N=8; R=2000 | 31.4939 | 31.4844 |
N=12; R=200 | 3.2043 | 3.2084 |
N=12; R=2000 | 31.4897 | 31.4831 |
N=16; R=200 | 3.1774 | 3.1824 |
N=16; R=2000 | 31.4899 | 31.4897 |
-----------------------------------
The power consumption tests have been done only on TC2 platform which has got accessible power lines and I have used cyclictest to simulate small tasks. The tests show some power consumption improvements.
test: cyclictest -t 8 -q -e 1000000 -D 20 & cyclictest -t 8 -q -e 1000000 -D 20
The measurements have been done during 16 seconds and the result has been normalized to 100
| CA15 | CA7 | total |
-------------------------------------
default | 100 | 40 | 140 |
pack | <1 | 45 | <46 |
-------------------------------------
The A15 cluster is less power efficient than the A7 cluster but if we assume that the tasks is well spread on both clusters, we can guest estimate that the power consumption on a dual cluster of CA7 would have been for a default kernel:
Vincent Guittot (6):
Revert "sched: introduce temporary FAIR_GROUP_SCHED dependency for
load-tracking"
sched: add a new SD SHARE_POWERLINE flag for sched_domain
sched: pack small tasks
sched: secure access to other CPU statistics
sched: pack the idle load balance
ARM: sched: clear SD_SHARE_POWERLINE
arch/arm/kernel/topology.c | 9 +++
arch/ia64/include/asm/topology.h | 1 +
arch/tile/include/asm/topology.h | 1 +
include/linux/sched.h | 9 +--
include/linux/topology.h | 4 ++
kernel/sched/core.c | 14 ++--
kernel/sched/fair.c | 134 +++++++++++++++++++++++++++++++++++++-
kernel/sched/sched.h | 14 ++--
8 files changed, 163 insertions(+), 23 deletions(-)
--
1.7.9.5
Linaro 12.12 Release (Calendar Week 51): Here is test result summary for
Linux Linaro ubuntu Quantal image on following boards:
1) ARM Versatile Express A9;
2) Samsung Origen;
3) TI Panda 4430;
4) TI Panda 4460;
5) ST Ericsson Snowball.
Synopsis: For the major issues, they are: ST Ericsson Snowball boots
failed, and no network connection on Samsung Origen. The other boards work
well on most of features.
1. ARM Versatile Express A9 + Linux Linaro Quantal (Column E):
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AroPySpr4FnEdFNmV…
It keeps exactly same status as last week: only "Halt" & "Device Tree" test
failed, all other features work well.
2. Samsung Origen + Linux Linaro Quantal (Column E):
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AroPySpr4FnEdEowN…
Exactly same test result as last week: network connection is unavailable,
"reboot" & "halt" test failed.. Power Management test would hang system
when run test "cpuhotplug_02".
3. TI Panda 4430 + Linux Linaro Quantal (Column E):
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AroPySpr4FnEdEwwZ…
ARM DS-5 backs to work. All 3 tests, data streaming, remote SSH connection
and on target application debug passed. Device Tree is unavailable, the
directory "/proc/device-tree" is empty. A new issue here is power
management test "cpuhotplug_07" failed. However, this test passed on TI
Panda 4460.
4. TI Panda 4460 + Linux Linaro Quantal (Column E):
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AroPySpr4FnEdEwwZ…
ARM DS-5 backs to work, now only Device Tree issue - empty
directory "/proc/device-tree" exists. All other features work well.
5. ST Ericsson Snowball + Linux Linaro Quantal (Column E):
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AroPySpr4FnEdFJ4X…
Same as last week, system boots failed.
For the previous week (Calendar week 50) summary, please refer to
attachment.
Thank you.
Best Regards
Botao Sun
Following issues fixed:
1. Name of generated rcport file is powertop*.csv not PowerTop*.csv
2. sudo not available in android so dropped it.
3. ls -1 not supported in android ls command so changed it to plain ls.
Signed-off-by: Chander Kashyap <chander.kashyap(a)linaro.org>
---
powertop/powertop_01.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/powertop/powertop_01.sh b/powertop/powertop_01.sh
index cf243f1..d2e78f2 100755
--- a/powertop/powertop_01.sh
+++ b/powertop/powertop_01.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bas
#
# PM-QA validation test suite for the power management on Linux
#
@@ -33,14 +33,14 @@ run_powertop() {
local report=csv
local seconds=10
local iterations=2
- local report_name=PowerTOP*.csv
+ local report_name=powertop*.csv
# remove old reports if exists
rm -f $report_name
# run powertop for $(iterations) in report generation mode
start_time=`date +%s`
- sudo $bin_path --$report --time=$seconds --iteration=$iterations
+ $bin_path --$report --time=$seconds --iteration=$iterations
end_time=`date +%s`
# check if powertop run for desired time
@@ -50,7 +50,7 @@ run_powertop() {
check "if powertop run for $expected_time sec" "test $actual_time -ge $expected_time"
# check if $(iterations) number of reports are generated
- check "if reports are generated" "test $(ls -1 $report_name | wc -l) -eq $iterations"
+ check "if reports are generated" "test $(ls $report_name | wc -l) -eq $iterations"
return 0
}
--
1.7.9.5
Following issues fixed:
1. Name of generated rcport file is powertop*.csv not PowerTop*.csv
2. sudo not available in android so dropped it.
3. "ls -1" not supported in android "ls" command so changed it to plain "ls".
Signed-off-by: Chander Kashyap <chander.kashyap(a)linaro.org>
---
Changes in v2:
fixed typo
powertop/powertop_01.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/powertop/powertop_01.sh b/powertop/powertop_01.sh
index cf243f1..6f2511f 100755
--- a/powertop/powertop_01.sh
+++ b/powertop/powertop_01.sh
@@ -33,14 +33,14 @@ run_powertop() {
local report=csv
local seconds=10
local iterations=2
- local report_name=PowerTOP*.csv
+ local report_name=powertop*.csv
# remove old reports if exists
rm -f $report_name
# run powertop for $(iterations) in report generation mode
start_time=`date +%s`
- sudo $bin_path --$report --time=$seconds --iteration=$iterations
+ $bin_path --$report --time=$seconds --iteration=$iterations
end_time=`date +%s`
# check if powertop run for desired time
@@ -50,7 +50,7 @@ run_powertop() {
check "if powertop run for $expected_time sec" "test $actual_time -ge $expected_time"
# check if $(iterations) number of reports are generated
- check "if reports are generated" "test $(ls -1 $report_name | wc -l) -eq $iterations"
+ check "if reports are generated" "test $(ls $report_name | wc -l) -eq $iterations"
return 0
}
--
1.7.9.5
Hi Andrey,
This is more of announcement than a PULL request. :)
Most of us are working with interactive governor. But most of us use
a different version of it, as it is not yet mainlined and there is no hope
of it getting mainlined.
http://lists.linaro.org/pipermail/linaro-kernel/2012-February/001122.html
So, we have decided to keep the latest version within Linaro and make it
part of our release, so that everybody works with the same version and
use it in ubuntu as well.
I am keeping it in my big LITTLE MP repository in separate branches:
- cpufreq-interactive-gov-master-v*: Latest version of governor from google tree
- cpufreq-interactive-gov-experimental-v*: Rebased over master with updates
from Linaro.
This is a PULL request for master branch:
--------------
The following changes since commit 9489e9dcae718d5fde988e4a684a0f55b5f94d17:
Linux 3.7-rc7 (2012-11-25 17:59:19 -0800)
are available in the git repository at:
git://git.linaro.org/arm/big.LITTLE/mp.git cpufreq-interactive-gov-master-v1
for you to fetch changes up to 1ad5d36179224fbcdddf8abf3cbfdd183da38b3e:
cpufreq: interactive: kick timer on idle exit past expiry
(2012-11-29 00:48:46 +0530)
----------------------------------------------------------------
John Stultz (1):
cpufreq-interactive: Compile fixup
Lianwei Wang (1):
cpufreq: interactive: use deferrable timer by default
Mike Chan (1):
cpufreq: interactive: New 'interactive' governor
Sam Leffler (2):
cpufreq: interactive: take idle notifications only when active
cpufreq: interactive: keep freezer happy when not current governor
Todd Poynor (24):
Move x86_64 idle notifiers to generic
ARM: Call idle notifiers
ARM: Move leds idle start/stop calls to idle notifiers
cpufreq interactive governor: event tracing
cpufreq: interactive: apply intermediate load to max speed not current
cpufreq: interactive: set at least hispeed when above hispeed load
cpufreq: interactive: don't drop speed if recently at higher load
cpufreq: interactive: configurable delay before raising above hispeed
cpufreq: interactive: adjust code and documentation to match
cpufreq: interactive: base hispeed bump on target freq, not actual
cpufreq: interactive: Separate speed target revalidate time and
initial set time
cpufreq: interactive: Boost frequency on touchscreen input
cpufreq: interactive: remove unused target_validate_time_in_idle
cpufreq: interactive: Add sysfs boost interface for hints from userspace
cpufreq: interactive: set floor for boosted speed
cpufreq: interactive: add boost pulse interface
cpufreq: interactive: restart above_hispeed_delay at each hispeed load
cpufreq: interactive: fixup trace of string params
cpufreq: interactive: handle speed up and down in the realtime task
cpufreq: interactive: remove input_boost handling
cpufreq: interactive: always limit initial speed bump to hispeed
cpufreq: interactive: run at fraction of hispeed_freq when load is low
cpufreq: interactive: pin timers to associated CPU
cpufreq: interactive: kick timer on idle exit past expiry
Documentation/cpu-freq/governors.txt | 59 +++
arch/arm/kernel/process.c | 4 +-
arch/x86/include/asm/idle.h | 7 -
arch/x86/kernel/process.c | 17 +-
drivers/cpufreq/Kconfig | 27 ++
drivers/cpufreq/Makefile | 1 +
drivers/cpufreq/cpufreq_interactive.c | 754 +++++++++++++++++++++++++++++
drivers/leds/ledtrig-cpu.c | 25 +
include/linux/cpu.h | 7 +
include/linux/cpufreq.h | 3 +
include/trace/events/cpufreq_interactive.h | 106 ++++
kernel/cpu.c | 20 +
12 files changed, 1006 insertions(+), 24 deletions(-)
create mode 100644 drivers/cpufreq/cpufreq_interactive.c
create mode 100644 include/trace/events/cpufreq_interactive.h