arm64: add HAVE_LATENCYTOP_SUPPORT config
Subsystems (11)
PATCH 1/1 arm64: add HAVE_LATENCYTOP_SUPPORT config
Add HAVE_LATENCYTOP_SUPPORT in Kconfig, so that
we can enable this feature on ARM64
--- arch/arm64/Kconfig | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm64/Kconfig +4 -0
@@ -103,6 +103,10 @@ config ARCH_PHYS_ADDR_T_64BIT config MMU def_bool y +config HAVE_LATENCYTOP_SUPPORT + bool + default y + config NO_IOPORT_MAP def_bool y if !PCI
Signature · 1 line
1.9.1
Quoted 2 lines · yalin wang
Add
HAVE_LATENCYTOP_SUPPORTinKconfig, so that
we can enable this feature on ARM64
Do you know what the prerequisites for HAVE_LATENCYTOP_SUPPORT actually are (beyond those explicitly listed as dependencies for CONFIG_LATENCYTOP)?
Will
i just enable it on ARM64,
and it can work,
i don?t see some special requirement to enable this config .
Quoted 10 lines · Will Deacon
Quoted 2 lines · yalin wang
Add
HAVE_LATENCYTOP_SUPPORTinKconfig, so that
we can enable this feature on ARM64Do you know what the prerequisites for
HAVE_LATENCYTOP_SUPPORTactually are (beyond those explicitly listed as dependencies forCONFIG_LATENCYTOP)?Will
Quoted 3 lines · yalin wang
i just enable it on ARM64,
and it can work,
i don?t see some special requirement to enable this config .
Right, so why does HAVE_LATENCYTOP_SUPPORT exist?
Will
Quoted 6 lines · Will Deacon
Quoted 3 lines · yalin wang
i just enable it on ARM64,
and it can work,
i don?t see some special requirement to enable this config .Right, so why does
HAVE_LATENCYTOP_SUPPORTexist?
If I remember correctly then the only dependency was that an architecture must have implemented save_stack_trace_tsk().
See git commit a3afe70b83fdbbd4d757d2911900d168bc798a31.
So the name of HAVE_LATENCYTOP_SUPPORT is surely a not well chosen, and I think I introduced it back then. Oh, well.
And looking through the kernel there is at least avr32 which would break at build time if the config option would be removed completely.
So.. renaming it to STACKTRACE_TSK_SUPPORT would be a good idea.
Will do when time permits, unless somebody else volunteers.
Hi Heiko,
Quoted 11 lines · Heiko Carstens
Quoted 6 lines · Will Deacon
Quoted 3 lines · yalin wang
i just enable it on ARM64,
and it can work,
i don?t see some special requirement to enable this config .Right, so why does
HAVE_LATENCYTOP_SUPPORTexist?If I remember correctly then the only dependency was that an architecture must have implemented
save_stack_trace_tsk().
See git commita3afe70b83fdbbd4d757d2911900d168bc798a31.
Thanks for the pointer.
Quoted 7 lines
So the name of
HAVE_LATENCYTOP_SUPPORTis surely a not well chosen, and I think I introduced it back then. Oh, well.And looking through the kernel there is at least avr32 which would break at build time if the config option would be removed completely.
So.. renaming it to
STACKTRACE_TSK_SUPPORTwould be a good idea.
ftrace has a similar issue and solves it by having architectures define a config STACKTRACE_SUPPORT' symbol. Over in kernel/trace/Kconfig, there's a select STACKTRACE if STACKTRACE_SUPPORT', which means that kernel/stacktrace.c gets built and a dummy (weak symbol) version of save_stack_trace_tsk appears.
I don't think adding another STACKTRACE-related Kconfig option is necessarily the best thing to do. Maybe we should instead have LATENCYTOP depend on STACKTRACE_SUPPORT (already the case) and select STACKTRACE?
Will
Quoted 10 lines · Will Deacon
Hi Heiko,
Quoted 7 lines · Heiko Carstens
Quoted 6 lines · Will Deacon
Quoted 3 lines · yalin wang
i just enable it on ARM64,
and it can work,
i don?t see some special requirement to enable this config .Right, so why does
HAVE_LATENCYTOP_SUPPORTexist?
[...]
Quoted 10 lines
Quoted 4 lines
And looking through the kernel there is at least avr32 which would break at build time if the config option would be removed completely.
So.. renaming it to
STACKTRACE_TSK_SUPPORTwould be a good idea.ftrace has a similar issue and solves it by having architectures define a
config STACKTRACE_SUPPORT' symbol. Over in kernel/trace/Kconfig, there's aselect STACKTRACE ifSTACKTRACE_SUPPORT', which means thatkernel/stacktrace.cgets built and a dummy (weak symbol) version ofsave_stack_trace_tskappears.
Ah, I wasn't aware of the weak symbol.
Quoted 3 lines
I don't think adding another STACKTRACE-related
Kconfigoption is necessarily the best thing to do. Maybe we should instead have LATENCYTOP depend onSTACKTRACE_SUPPORT(already the case) and select STACKTRACE?
LATENCYTOP also already selects STACKTRACE. So it looks like HAVE_LATENCYTOP_SUPPORT could simply be removed.
Quoted 23 lines · Heiko Carstens
Quoted 10 lines · Will Deacon
Hi Heiko,
Quoted 7 lines · Heiko Carstens
Quoted 6 lines · Will Deacon
Quoted 3 lines · yalin wang
i just enable it on ARM64,
and it can work,
i don?t see some special requirement to enable this config .Right, so why does
HAVE_LATENCYTOP_SUPPORTexist?[...]
Quoted 10 lines
Quoted 4 lines
And looking through the kernel there is at least avr32 which would break at build time if the config option would be removed completely.
So.. renaming it to
STACKTRACE_TSK_SUPPORTwould be a good idea.ftrace has a similar issue and solves it by having architectures define a
config STACKTRACE_SUPPORT' symbol. Over in kernel/trace/Kconfig, there's aselect STACKTRACE ifSTACKTRACE_SUPPORT', which means thatkernel/stacktrace.cgets built and a dummy (weak symbol) version ofsave_stack_trace_tskappears.
Quoted 8 lines
Ah, I wasn't aware of the weak symbol.
Quoted 3 lines
I don't think adding another STACKTRACE-related
Kconfigoption is necessarily the best thing to do. Maybe we should instead have LATENCYTOP depend onSTACKTRACE_SUPPORT(already the case) and select STACKTRACE?LATENCYTOP also already selects STACKTRACE. So it looks like
HAVE_LATENCYTOP_SUPPORTcould simply be removed.
Ha, so it does! Patch below. The only non-trivial part was arch/arm/, which has a dependency on !SMP which I believe is no longer required as of d5996b2ff0e2 ("ARM: fix /proc/$PID/stack on SMP").
Will
--->8
Quoted 1 line
From
8dfb40e92ac322cbd68bf9f16cbb11fc5e210269Mon Sep 17 00:00:00 2001
From: Will Deacon <[email protected]>
Date: Tue, 10 Nov 2015 11:10:04 +0000
Subject: [PATCH] Kconfig: remove HAVE_LATENCYTOP_SUPPORT
As illustrated by a3afe70b83fd ("[S390] latencytop s390 support."), HAVE_LATENCYTOP_SUPPORT is defined by an architecture to advertise an implementation of save_stack_trace_tsk.
However, as of 9212ddb5eada ("stacktrace: provide save_stack_trace_tsk() weak alias") a dummy implementation is provided if STACKTRACE=y. Given that LATENCYTOP already depends on STACKTRACE_SUPPORT and selects STACKTRACE, we can remove HAVE_LATENCYTOP_SUPPORT altogether.
--- arch/arc/Kconfig | 3 --- arch/arm/Kconfig | 5 ----- arch/metag/Kconfig | 3 --- arch/microblaze/Kconfig | 3 --- arch/parisc/Kconfig | 3 --- arch/powerpc/Kconfig | 3 --- arch/s390/Kconfig | 3 --- arch/sh/Kconfig | 3 --- arch/sparc/Kconfig | 4 ---- arch/unicore32/Kconfig | 3 --- arch/x86/Kconfig | 3 --- lib/Kconfig.debug | 1 - 12 files changed, 37 deletions(-)
arch/arc/Kconfig +0 -3
@@ -73,9 +73,6 @@ config STACKTRACE_SUPPORT def_bool y select STACKTRACE -config HAVE_LATENCYTOP_SUPPORT - def_bool y - config HAVE_ARCH_TRANSPARENT_HUGEPAGE def_bool y depends on ARC_MMU_V4
arch/arm/Kconfig +0 -5
@@ -162,11 +162,6 @@ config STACKTRACE_SUPPORT bool default y -config HAVE_LATENCYTOP_SUPPORT - bool - depends on !SMP - default y - config LOCKDEP_SUPPORT bool default y
arch/metag/Kconfig +0 -3
@@ -36,9 +36,6 @@ config STACKTRACE_SUPPORT config LOCKDEP_SUPPORT def_bool y -config HAVE_LATENCYTOP_SUPPORT - def_bool y - config RWSEM_GENERIC_SPINLOCK def_bool y
arch/microblaze/Kconfig +0 -3
@@ -67,9 +67,6 @@ config STACKTRACE_SUPPORT config LOCKDEP_SUPPORT def_bool y -config HAVE_LATENCYTOP_SUPPORT - def_bool y - source "init/Kconfig" source "kernel/Kconfig.freezer"
arch/parisc/Kconfig +0 -3
@@ -79,9 +79,6 @@ config TIME_LOW_RES depends on SMP default y -config HAVE_LATENCYTOP_SUPPORT - def_bool y - # unless you want to implement ACPI on PA-RISC ... ;-) config PM bool
arch/powerpc/Kconfig +0 -3
@@ -47,9 +47,6 @@ config STACKTRACE_SUPPORT bool default y -config HAVE_LATENCYTOP_SUPPORT - def_bool y - config TRACE_IRQFLAGS_SUPPORT bool default y
arch/s390/Kconfig +0 -3
@@ -10,9 +10,6 @@ config LOCKDEP_SUPPORT config STACKTRACE_SUPPORT def_bool y -config HAVE_LATENCYTOP_SUPPORT - def_bool y - config RWSEM_GENERIC_SPINLOCK bool
arch/sh/Kconfig +0 -3
@@ -130,9 +130,6 @@ config STACKTRACE_SUPPORT config LOCKDEP_SUPPORT def_bool y -config HAVE_LATENCYTOP_SUPPORT - def_bool y - config ARCH_HAS_ILOG2_U32 def_bool n
arch/sparc/Kconfig +0 -4
@@ -101,10 +101,6 @@ config LOCKDEP_SUPPORT bool default y if SPARC64 -config HAVE_LATENCYTOP_SUPPORT - bool - default y if SPARC64 - config ARCH_HIBERNATION_POSSIBLE def_bool y if SPARC64
arch/unicore32/Kconfig +0 -3
@@ -33,9 +33,6 @@ config NO_IOPORT_MAP config STACKTRACE_SUPPORT def_bool y -config HAVE_LATENCYTOP_SUPPORT - def_bool y - config LOCKDEP_SUPPORT def_bool y
arch/x86/Kconfig +0 -3
@@ -177,9 +177,6 @@ config LOCKDEP_SUPPORT config STACKTRACE_SUPPORT def_bool y -config HAVE_LATENCYTOP_SUPPORT - def_bool y - config MMU def_bool y
lib/Kconfig.debug +0 -1
@@ -1547,7 +1547,6 @@ config FAULT_INJECTION_STACKTRACE_FILTER config LATENCYTOP bool "Latency measuring infrastructure" - depends on HAVE_LATENCYTOP_SUPPORT depends on DEBUG_KERNEL depends on STACKTRACE_SUPPORT depends on PROC_FS
Signature · 1 line
2.1.4
Quoted 207 lines · Will Deacon
Ha, so it does! Patch below. The only non-trivial part was
arch/arm/, which has a dependency on !SMP which I believe is no longer required as ofd5996b2ff0e2("ARM: fix/proc/$PID/stackon SMP").Will
--->8
From
8dfb40e92ac322cbd68bf9f16cbb11fc5e210269Mon Sep 17 00:00:00 2001
From: Will Deacon <[email protected]>
Date: Tue, 10 Nov 2015 11:10:04 +0000
Subject: [PATCH]Kconfig: removeHAVE_LATENCYTOP_SUPPORTAs illustrated by
a3afe70b83fd("[S390] latencytop s390 support."),HAVE_LATENCYTOP_SUPPORTis defined by an architecture to advertise an implementation ofsave_stack_trace_tsk.However, as of
9212ddb5eada("stacktrace: providesave_stack_trace_tsk()weak alias") a dummy implementation is provided if STACKTRACE=y. Given that LATENCYTOP already depends onSTACKTRACE_SUPPORTand selects STACKTRACE, we can removeHAVE_LATENCYTOP_SUPPORTaltogether.Signed-off-by Will Deacon <[email protected]>---
arch/arc/Kconfig | 3 --- arch/arm/Kconfig | 5 ----- arch/metag/Kconfig | 3 --- arch/microblaze/Kconfig | 3 --- arch/parisc/Kconfig | 3 --- arch/powerpc/Kconfig | 3 --- arch/s390/Kconfig | 3 --- arch/sh/Kconfig | 3 --- arch/sparc/Kconfig | 4 ---- arch/unicore32/Kconfig | 3 --- arch/x86/Kconfig | 3 --- lib/Kconfig.debug | 1 - 12 files changed, 37 deletions(-)arch/arc/Kconfig +0
-3@@ -73,9 +73,6 @@ config STACKTRACE_SUPPORT def_bool y select STACKTRACE -config HAVE_LATENCYTOP_SUPPORT - def_bool y -config
HAVE_ARCH_TRANSPARENT_HUGEPAGE
def_booly
depends onARC_MMU_V4arch/arm/Kconfig +0
-5@@ -162,11 +162,6 @@ config STACKTRACE_SUPPORT bool default y -config HAVE_LATENCYTOP_SUPPORT - bool - depends on !SMP - default y -config
LOCKDEP_SUPPORT
bool
default yarch/metag/Kconfig +0
-0@@ -36,9 +36,6 @@ config STACKTRACE_SUPPORTconfig
LOCKDEP_SUPPORT
def_boolyarch/metag/Kconfig +0
-3-config HAVE_LATENCYTOP_SUPPORT - def_bool y -config
RWSEM_GENERIC_SPINLOCK
def_boolyarch/microblaze/Kconfig +0
-0@@ -67,9 +67,6 @@ config STACKTRACE_SUPPORTconfig
LOCKDEP_SUPPORT
def_boolyarch/microblaze/Kconfig +0
-3-config HAVE_LATENCYTOP_SUPPORT - def_bool y -source "init/Kconfig"
source "
kernel/Kconfig.freezer"arch/parisc/Kconfig +0
-3@@ -79,9 +79,6 @@ config TIME_LOW_RES depends on SMP default y -config HAVE_LATENCYTOP_SUPPORT - def_bool y - # unless you want to implement ACPI on PA-RISC ... ;-)config PM
boolarch/powerpc/Kconfig +0
-3@@ -47,9 +47,6 @@ config STACKTRACE_SUPPORT bool default y -config HAVE_LATENCYTOP_SUPPORT - def_bool y -config
TRACE_IRQFLAGS_SUPPORT
bool
default yarch/s390/Kconfig +0
-0@@ -10,9 +10,6 @@ config LOCKDEP_SUPPORTconfig
STACKTRACE_SUPPORT
def_boolyarch/s390/Kconfig +0
-3-config HAVE_LATENCYTOP_SUPPORT - def_bool y -config
RWSEM_GENERIC_SPINLOCK
boolarch/sh/Kconfig +0
-0@@ -130,9 +130,6 @@ config STACKTRACE_SUPPORTconfig
LOCKDEP_SUPPORT
def_boolyarch/sh/Kconfig +0
-3-config HAVE_LATENCYTOP_SUPPORT - def_bool y -config
ARCH_HAS_ILOG2_U32
def_boolnarch/sparc/Kconfig +0
-4@@ -101,10 +101,6 @@ config LOCKDEP_SUPPORT bool default y if SPARC64 -config HAVE_LATENCYTOP_SUPPORT - bool - default y if SPARC64 -config
ARCH_HIBERNATION_POSSIBLE
def_booly if SPARC64arch/unicore32/Kconfig +0
-0@@ -33,9 +33,6 @@ config NO_IOPORT_MAPconfig
STACKTRACE_SUPPORT
def_boolyarch/unicore32/Kconfig +0
-3-config HAVE_LATENCYTOP_SUPPORT - def_bool y -config
LOCKDEP_SUPPORT
def_boolyarch/x86/Kconfig +0
-0@@ -177,9 +177,6 @@ config LOCKDEP_SUPPORTconfig
STACKTRACE_SUPPORT
def_boolyarch/x86/Kconfig +0
-3-config HAVE_LATENCYTOP_SUPPORT - def_bool y -config MMU
def_boolylib/Kconfig.debug +0
-0@@ -1547,7 +1547,6 @@ config FAULT_INJECTION_STACKTRACE_FILTERconfig LATENCYTOP
bool "Latency measuring infrastructure"lib/Kconfig.debug +0
-1- depends on HAVE_LATENCYTOP_SUPPORT
Quoted 5 lines
depends on
DEBUG_KERNEL
depends onSTACKTRACE_SUPPORT
depends onPROC_FSSignature · 1 line
2.1.4
seems fine. :)
Heiko Carstens
Acked-byQuoted 14 lines
From: Will Deacon <[email protected]>
Date: Tue, 10 Nov 2015 11:10:04 +0000
Subject: [PATCH]Kconfig: removeHAVE_LATENCYTOP_SUPPORTAs illustrated by
a3afe70b83fd("[S390] latencytop s390 support."),HAVE_LATENCYTOP_SUPPORTis defined by an architecture to advertise an implementation ofsave_stack_trace_tsk.However, as of
9212ddb5eada("stacktrace: providesave_stack_trace_tsk()weak alias") a dummy implementation is provided if STACKTRACE=y. Given that LATENCYTOP already depends onSTACKTRACE_SUPPORTand selects STACKTRACE, we can removeHAVE_LATENCYTOP_SUPPORTaltogether.Signed-off-by Will Deacon <[email protected]>
Quoted 14 lines
--- arch/arc/Kconfig | 3 --- arch/arm/Kconfig | 5 ----- arch/metag/Kconfig | 3 --- arch/microblaze/Kconfig | 3 --- arch/parisc/Kconfig | 3 --- arch/powerpc/Kconfig | 3 --- arch/s390/Kconfig | 3 --- arch/sh/Kconfig | 3 --- arch/sparc/Kconfig | 4 ---- arch/unicore32/Kconfig | 3 --- arch/x86/Kconfig | 3 --- lib/Kconfig.debug | 1 - 12 files changed, 37 deletions(-)
Hi folks,
I tried to enable latencytop for arm64 and came across this discussion, so any plan about when this will get merged into mainline? 4.5 merge window?
Thanks,
Yang
Quoted 37 lines · Heiko Carstens
Quoted 14 lines
From: Will Deacon <[email protected]>
Date: Tue, 10 Nov 2015 11:10:04 +0000
Subject: [PATCH]Kconfig: removeHAVE_LATENCYTOP_SUPPORTAs illustrated by
a3afe70b83fd("[S390] latencytop s390 support."),HAVE_LATENCYTOP_SUPPORTis defined by an architecture to advertise an implementation ofsave_stack_trace_tsk.However, as of
9212ddb5eada("stacktrace: providesave_stack_trace_tsk()weak alias") a dummy implementation is provided if STACKTRACE=y. Given that LATENCYTOP already depends onSTACKTRACE_SUPPORTand selects STACKTRACE, we can removeHAVE_LATENCYTOP_SUPPORTaltogether.Signed-off-by Will Deacon <[email protected]>Quoted 14 lines
--- arch/arc/Kconfig | 3 --- arch/arm/Kconfig | 5 ----- arch/metag/Kconfig | 3 --- arch/microblaze/Kconfig | 3 --- arch/parisc/Kconfig | 3 --- arch/powerpc/Kconfig | 3 --- arch/s390/Kconfig | 3 --- arch/sh/Kconfig | 3 --- arch/sparc/Kconfig | 4 ---- arch/unicore32/Kconfig | 3 --- arch/x86/Kconfig | 3 --- lib/Kconfig.debug | 1 - 12 files changed, 37 deletions(-)Acked-by Heiko Carstens <[email protected]>_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 2 lines · Yang
I tried to enable latencytop for arm64 and came across this discussion, so any plan about when this will get merged into mainline? 4.5 merge window?
It's queued in linux-next, so I imagine its heading for 4.5.
Will