Adding libdw DWARF post unwind support, which is part
of elfutils-devel/libdw-dev package from version 0.158.
Also includes the test suite for dwarf unwinding, by adding the
arch specific test code and the perf_regs_load function.
This series depends on the following kernel patches series:
- AARCH64 unwinding support [1],
- ARM libdw integration [2],
and on the changes from the branch for:
- libdw AARCH64 unwinding support [3].
[1] http://www.spinics.net/lists/arm-kernel/msg304483.html
[2] http://www.spinics.net/lists/arm-kernel/msg312423.html
[3] https://git.fedorahosted.org/cgit/elfutils.git/log/?h=mjw/aarch64-unwind
Jean Pihet (3):
perf tests: Introduce perf_regs_load function on ARM64
perf tests: Add dwarf unwind test on ARM64
perf tools: Add libdw DWARF post unwind support for ARM64
tools/perf/Makefile.perf | 2 +-
tools/perf/arch/arm64/Makefile | 7 ++++
tools/perf/arch/arm64/include/perf_regs.h | 5 +++
tools/perf/arch/arm64/tests/dwarf-unwind.c | 59 ++++++++++++++++++++++++++++++
tools/perf/arch/arm64/tests/regs_load.S | 39 ++++++++++++++++++++
tools/perf/arch/arm64/util/unwind-libdw.c | 53 +++++++++++++++++++++++++++
tools/perf/tests/builtin-test.c | 3 +-
tools/perf/tests/tests.h | 3 +-
8 files changed, 168 insertions(+), 3 deletions(-)
create mode 100644 tools/perf/arch/arm64/tests/dwarf-unwind.c
create mode 100644 tools/perf/arch/arm64/tests/regs_load.S
create mode 100644 tools/perf/arch/arm64/util/unwind-libdw.c
---
- Rebased on latest acme/perf/core git tree,
- Tested on the ARMv8 Foundation emulator.
--
1.7.11.7
For networking platforms we need to provide one isolated CPU per user space data
plane thread. These CPUs should not be interrupted by kernel at all unless
userspace has requested for some syscalls. And so must live in isolated mode.
Currently, there are background kernel activities that are running on almost
every CPU, like: timers/hrtimers/watchdogs/etc, and these are required to be
migrated to other CPUs.
This patchset tries to migrate un-pinned timers away in the first attempt. And
support for migrating others like hrtimers/workqueues/etc would be added later.
This has only went through basic testing currently on ARM Samsung Exynos board
which only has two CPUs. Separate cpusets were created for these two CPUs and
then timers were migrated from one cpuset to other.
This option was earlier suggested by Peter Z. here.
https://lkml.org/lkml/2014/1/15/186
Please provide your inputs on how this can be improved..
Viresh Kumar (4):
timer: track pinned timers with TIMER_PINNED flag
timer: don't migrate pinned timers
timer: create timer_quiesce_cpu() for cpusets.quiesce option
cpuset: Add cpusets.quiesce option
include/linux/timer.h | 10 +++---
kernel/cpuset.c | 56 +++++++++++++++++++++++++++++++
kernel/timer.c | 92 +++++++++++++++++++++++++++++++++++++++++----------
3 files changed, 136 insertions(+), 22 deletions(-)
--
1.7.12.rc2.18.g61b472e
Patch to avoid calling kernel_power_off when pm_power_off is null.
When pm_power_off is null, the platform will not power off in
kernel_power_off. Currently, hibernate will call kernel_power_off and
then move on to kernel_halt. However, this calls the notifier chain
twice with a different parameter. In kernel/reboot.c, this is avoided
by checking if pm_power_off is NULL and bypassing kernel_power_off.
Mostly, this is a check if anyone is dependent on having the reboot
notifier called 2x if pm_power_off is null. There are some panics if
it's called this way in some drivers.
Tested this on omap beaglebone black, but have not tried on other
hardware. Please let me know if you can test this on another platform
and the results.
Thanks,
Sebastian
Part of this patchset was previously part of the larger tasks packing patchset
[1]. I have splitted the latter in 3 different patchsets (at least) to make the
thing easier.
-configuration of sched_domain topology [2]
-update and consolidation of cpu_power (this patchset)
-tasks packing algorithm
SMT system is no more the only system that can have a CPUs with capacity that
is different from the default value. We need to extend the use of
cpu_power_orig to all kind of platform so the scheduler will have both the
maximum capacity (cpu_power_orig/power_orig) and the current capacity
(cpu_power/power) of CPUs and groups of the sched_domains.
During load balance, the scheduler evaluates the number of tasks that a group
of CPUs can handle. The current method ensures that we will not return more
capacity than number of real cores but it returns wrong value for group of
LITTLE cores and in some situation for SMT system. The proposed solution
computes the ratio between CPUs and cores for a group durint the init sequence
and uses it with power and power_orig to return the current capacity of a
group.
[1] https://lkml.org/lkml/2013/10/18/121
[2] https://lkml.org/lkml/2014/3/19/377
Vincent Guittot (4):
sched: extend the usage of cpu_power_orig
ARM: topology: use new cpu_power interface
sched: fix computed capacity for HMP
sched: add per group cpu_power_orig
arch/arm/kernel/topology.c | 4 ++--
kernel/sched/core.c | 9 ++++++++-
kernel/sched/fair.c | 31 +++++++++++++++++++------------
kernel/sched/sched.h | 3 ++-
4 files changed, 31 insertions(+), 16 deletions(-)
--
1.9.0
Cc: Russ Dill <Russ.Dill(a)ti.com>
Cc: "Rafael J. Wysocki" <rjw(a)rjwysocki.net>
Cc: Russell King <linux(a)arm.linux.org.uk>
Cc: Pavel Machek <pavel(a)ucw.cz>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi(a)arm.com>
Cc: Stephen Warren <swarren(a)nvidia.com>
Cc: Len Brown <len.brown(a)intel.com>
Cc: Nicolas Pitre <nico(a)linaro.org>
Cc: Santosh Shilimkar <santosh.shilimkar(a)ti.com>
Cc: Will Deacon <will.deacon(a)arm.com>
Cc: Jonathan Austin <jonathan.austin(a)arm.com>
Cc: Catalin Marinas <catalin.marinas(a)arm.com>
Cc: "Uwe Kleine-König" <u.kleine-koenig(a)pengutronix.de>
Cc: Stephen Boyd <sboyd(a)codeaurora.org>
Cc: Laura Abbott <lauraa(a)codeaurora.org>
Cc: Jiang Liu <liuj97(a)gmail.com>
Cc: Sricharan R <r.sricharan(a)ti.com>
Cc: Victor Kamensky <victor.kamensky(a)linaro.org>
Cc: Stefano Stabellini <stefano.stabellini(a)eu.citrix.com>
Cc: Ben Dooks <ben.dooks(a)codethink.co.uk>
Cc: Andrew Morton <akpm(a)linux-foundation.org>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: Robin Holt <robin.m.holt(a)gmail.com>
Cc: Konstantin Khlebnikov <k.khlebnikov(a)samsung.com>
Cc: Steven Capper <steve.capper(a)linaro.org>
Cc: Tejun Heo <tj(a)kernel.org>
Patches adding support for hibernation on ARM
- ARM hibernation / suspend-to-disk
- Change soft_restart to use non-tracing raw_local_irq_disable
Patches based on v3.14-rc7 tag, verified hibernation on beaglebone black on a
branch based on 3.13 merged with initial omap support from Russ Dill which
can be found here (includes v1 patchset):
http://git.linaro.org/git-ro/people/sebastian.capella/linux.git hibernation_3.13_russMerge
[PATCH v9 1/2] ARM: avoid tracers in soft_restart
arch/arm/kernel/process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Use raw_local_irq_disable in place of local_irq_disable to avoid
infinite abort recursion while tracing. (unchanged since v3)
[PATCH v9 2/2] ARM hibernation / suspend-to-disk
arch/arm/Kconfig | 5 ++
arch/arm/include/asm/memory.h | 1 +
arch/arm/kernel/Makefile | 1 +
arch/arm/kernel/hibernate.c | 107 +++++++++++++++++++++++++++++++++++++++++
include/linux/suspend.h | 2 +
5 files changed, 116 insertions(+)
Adds support for ARM based hibernation
Additional notes:
-----------------
There are two checkpatch warnings added by this patch. These follow
behavior in existing hibernation implementations on other platforms.
WARNING: externs should be avoided in .c files
#131: FILE: arch/arm/kernel/hibernate.c:25:
+extern const void __nosave_begin, __nosave_end;
This extern is picking up the linker nosave region definitions, only
used in hibernate. Follows same extern line used mips, powerpc, s390,
sh, sparc, x86 & unicore32
WARNING: externs should be avoided in .c files
#209: FILE: arch/arm/kernel/hibernate.c:103:
+ extern void call_with_stack(void (*fn)(void *), void *arg, void *sp);
This extern is used in the arch/arm/ in hibernate, process and bL_switcher
Changes in v9:
--------------
* replace pfn calculationwith virt_to_pfn
* automatically allow ARCH_HIBERNATION_POSSIBLE if SUSPEND permitted
* move handling of ARCH config flag to arch/arm/Kconfig
Changes in v8:
--------------
* remove definition and use of __pa_symbol
Changes in v7:
--------------
* remove use of RELOC_HIDE macro
* remove unused #includes
* fixup comment for arch_restore_image
* ensure alignment of resume stack on 8 byte boundary
Changes in v6:
--------------
* Simplify static variable names
Changes in v5:
--------------
* Fixed checkpatch warning on trailing whitespace
Changes in v4:
--------------
* updated comment for soft_restart with review feedback
* dropped freeze_processes patch which was queued separately
to 3.14 by Rafael Wysocki:
https://lkml.org/lkml/2014/2/25/683
Changes in v3:
--------------
* added comment to use of soft_restart
* drop irq disable soft_restart patch
* add patch to avoid tracers in soft_restart by using raw_local_irq_*
Changes in v2:
--------------
* Removed unneeded flush_thread, use of __naked and cpu_init.
* dropped Cyril Chemparathy <cyril(a)ti.com> from Cc: list as
emails are bouncing.
Thanks,
Sebastian Capella
From: Mark Brown <broonie(a)linaro.org>
The ARMv8 code will reject topologies that omit some CPUs (and it's not
clear that it's ever sensible to do so). Update the binding document to
make this clear.
Since we're reformatting the text also fix incorrect grammar in the
final "Any other configuration..." section by removing "consider".
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
Documentation/devicetree/bindings/arm/topology.txt | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/arm/topology.txt b/Documentation/devicetree/bindings/arm/topology.txt
index 4aa20e7..1061faf 100644
--- a/Documentation/devicetree/bindings/arm/topology.txt
+++ b/Documentation/devicetree/bindings/arm/topology.txt
@@ -75,9 +75,10 @@ The cpu-map node can only contain three types of child nodes:
whose bindings are described in paragraph 3.
-The nodes describing the CPU topology (cluster/core/thread) can only be
-defined within the cpu-map node.
-Any other configuration is consider invalid and therefore must be ignored.
+The nodes describing the CPU topology (cluster/core/thread) can only
+be defined within the cpu-map node and every core/thread in the system
+must be defined within the topology. Any other configuration is
+invalid and therefore must be ignored.
===========================================
2.1 - cpu-map child nodes naming convention
--
1.9.1
.driver_data field is only required to be filled if drivers want to preserve
some data in there which they can use according to the value of .frequency
field. But this driver isn't using this field at all, but just setting it equal
to the index value. Which isn't required. Fix it.
Signed-off-by: Viresh Kumar <viresh.kumar(a)linaro.org>
---
V1->V2: No Change
Hi Rafael,
To avoid confusion I am sending all related cpufreq patches again.
drivers/cpufreq/ia64-acpi-cpufreq.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/cpufreq/ia64-acpi-cpufreq.c b/drivers/cpufreq/ia64-acpi-cpufreq.c
index a22b5d1..beb191b 100644
--- a/drivers/cpufreq/ia64-acpi-cpufreq.c
+++ b/drivers/cpufreq/ia64-acpi-cpufreq.c
@@ -275,7 +275,6 @@ acpi_cpufreq_cpu_init (
/* table init */
for (i = 0; i <= data->acpi_data.state_count; i++)
{
- data->freq_table[i].driver_data = i;
if (i < data->acpi_data.state_count) {
data->freq_table[i].frequency =
data->acpi_data.states[i].core_frequency * 1000;
--
1.7.12.rc2.18.g61b472e
In anticipation of modifying the up_threshold handling, make all
instances use the same utility fn to check if a task is eligible
for up-migration. This also removes the previous difference in
threshold comparison where up-migration used '!<threshold' and
idle pull used '>threshold' to decide up-migration eligibility.
Make them both use '!<threshold' instead for consistency, although
this is unlikely to change any results.
Signed-off-by: Chris Redpath <chris.redpath(a)arm.com>
---
kernel/sched/fair.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 62a8808..29e2c74 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6734,6 +6734,14 @@ static void nohz_idle_balance(int this_cpu, enum cpu_idle_type idle) { }
#endif
#ifdef CONFIG_SCHED_HMP
+static unsigned int hmp_task_eligible_for_up_migration(struct sched_entity *se)
+{
+ /* below hmp_up_threshold, never eligible */
+ if (se->avg.load_avg_ratio < hmp_up_threshold)
+ return 0;
+ return 1;
+}
+
/* Check if task should migrate to a faster cpu */
static unsigned int hmp_up_migration(int cpu, int *target_cpu, struct sched_entity *se)
{
@@ -6749,7 +6757,7 @@ static unsigned int hmp_up_migration(int cpu, int *target_cpu, struct sched_enti
if (p->prio >= hmp_up_prio)
return 0;
#endif
- if (se->avg.load_avg_ratio < hmp_up_threshold)
+ if (!hmp_task_eligible_for_up_migration(se))
return 0;
/* Let the task load settle before doing another up migration */
@@ -7237,7 +7245,10 @@ static unsigned int hmp_idle_pull(int this_cpu)
}
orig = curr;
curr = hmp_get_heaviest_task(curr, 1);
- if (curr->avg.load_avg_ratio > hmp_up_threshold &&
+ /* check if heaviest eligible task on this
+ * CPU is heavier than previous task
+ */
+ if (hmp_task_eligible_for_up_migration(curr) &&
curr->avg.load_avg_ratio > ratio) {
p = task_of(curr);
target = rq;
--
1.7.9.5
Earlier patch tried to do this but missed this piece of code to fix.
42f921a cpufreq: remove sysfs files for CPUs which failed to come back after
resume
Currently we are getting this on suspend/resume:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 877 at fs/sysfs/dir.c:52 sysfs_warn_dup+0x68/0x84()
sysfs: cannot create duplicate filename '/devices/system/cpu/cpu1/cpufreq'
Modules linked in: brcmfmac brcmutil
CPU: 0 PID: 877 Comm: test-rtc-resume Not tainted 3.14.0-rc2-00259-g9398a10cd964 #12
[<c0015bac>] (unwind_backtrace) from [<c0011850>] (show_stack+0x10/0x14)
[<c0011850>] (show_stack) from [<c056e018>] (dump_stack+0x80/0xcc)
[<c056e018>] (dump_stack) from [<c0025e44>] (warn_slowpath_common+0x64/0x88)
[<c0025e44>] (warn_slowpath_common) from [<c0025efc>] (warn_slowpath_fmt+0x30/0x40)
[<c0025efc>] (warn_slowpath_fmt) from [<c012776c>] (sysfs_warn_dup+0x68/0x84)
[<c012776c>] (sysfs_warn_dup) from [<c0127a54>] (sysfs_do_create_link_sd+0xb0/0xb8)
[<c0127a54>] (sysfs_do_create_link_sd) from [<c038ef64>] (__cpufreq_add_dev.isra.27+0x2a8/0x814)
[<c038ef64>] (__cpufreq_add_dev.isra.27) from [<c038f548>] (cpufreq_cpu_callback+0x70/0x8c)
[<c038f548>] (cpufreq_cpu_callback) from [<c0043864>] (notifier_call_chain+0x44/0x84)
[<c0043864>] (notifier_call_chain) from [<c0025f60>] (__cpu_notify+0x28/0x44)
[<c0025f60>] (__cpu_notify) from [<c00261e8>] (_cpu_up+0xf0/0x140)
[<c00261e8>] (_cpu_up) from [<c0569eb8>] (enable_nonboot_cpus+0x68/0xb0)
[<c0569eb8>] (enable_nonboot_cpus) from [<c006339c>] (suspend_devices_and_enter+0x198/0x2dc)
[<c006339c>] (suspend_devices_and_enter) from [<c0063654>] (pm_suspend+0x174/0x1e8)
[<c0063654>] (pm_suspend) from [<c00624e0>] (state_store+0x6c/0xbc)
[<c00624e0>] (state_store) from [<c01fc200>] (kobj_attr_store+0x14/0x20)
[<c01fc200>] (kobj_attr_store) from [<c0126e50>] (sysfs_kf_write+0x44/0x48)
[<c0126e50>] (sysfs_kf_write) from [<c012a274>] (kernfs_fop_write+0xb4/0x14c)
[<c012a274>] (kernfs_fop_write) from [<c00d4818>] (vfs_write+0xa8/0x180)
[<c00d4818>] (vfs_write) from [<c00d4bb8>] (SyS_write+0x3c/0x70)
[<c00d4bb8>] (SyS_write) from [<c000e620>] (ret_fast_syscall+0x0/0x30)
---[ end trace 76969904b614c18f ]---
Fix this by removing sysfs link for cpufreq directory when cpu removed isn't
policy->cpu.
Reported-by: Stephen Warren <swarren(a)nvidia.com>
Signed-off-by: Viresh Kumar <viresh.kumar(a)linaro.org>
---
Fix for 3.14 only.
drivers/cpufreq/cpufreq.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 08ca8c9..cb003a6 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1323,8 +1323,7 @@ static int __cpufreq_remove_dev_prepare(struct device *dev,
up_read(&policy->rwsem);
if (cpu != policy->cpu) {
- if (!frozen)
- sysfs_remove_link(&dev->kobj, "cpufreq");
+ sysfs_remove_link(&dev->kobj, "cpufreq");
} else if (cpus > 1) {
new_cpu = cpufreq_nominate_new_policy_cpu(policy, cpu);
if (new_cpu >= 0) {
--
1.7.12.rc2.18.g61b472e