With the recent feature added to enable perf events to use pseudo NMIs
as interrupts on platforms which support GICv3 or later, its now been
possible to enable hard lockup detector (or NMI watchdog) on arm64
platforms. So enable corresponding support.
One thing to note here is that normally lockup detector is initialized
just after the early initcalls but PMU on arm64 comes up much later as
device_initcall(). So we need to re-initialize lockup detection once
PMU has been initialized.
Signed-off-by: Sumit Garg <redacted>
---
Changes in v5:
- Fix lockup_detector_init() invocation to be rather invoked from CPU
binded context as it makes heavy use of per-cpu variables and shouldn't
be invoked from preemptible context.
Changes in v4:
- Rebased to latest pmu v7 NMI patch-set [1] and in turn use "has_nmi"
hook to know if PMU IRQ has been requested as an NMI.
- Add check for return value prior to initializing hard-lockup detector.
[1] https://lkml.org/lkml/2020/9/24/458
Changes in v3:
- Rebased to latest pmu NMI patch-set [1].
- Addressed misc. comments from Stephen.
[1] https://lkml.org/lkml/2020/8/19/671
Changes since RFC:
- Rebased on top of Alex's WIP-pmu-nmi branch.
- Add comment for safe max. CPU frequency.
- Misc. cleanup.
arch/arm64/Kconfig | 2 ++
arch/arm64/kernel/perf_event.c | 48 ++++++++++++++++++++++++++++++++++++++++--
drivers/perf/arm_pmu.c | 5 +++++
include/linux/perf/arm_pmu.h | 2 ++
4 files changed, 55 insertions(+), 2 deletions(-)
@@ -163,6 +163,8 @@ int arm_pmu_acpi_probe(armpmu_init_fn init_fn);staticinlineintarm_pmu_acpi_probe(armpmu_init_fninit_fn){return0;}#endif+boolarm_pmu_irq_is_nmi(void);+/* Internal functions only for core arm_pmu code */structarm_pmu*armpmu_alloc(void);structarm_pmu*armpmu_alloc_atomic(void);
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: Will Deacon <will@kernel.org> Date: 2021-01-26 14:20:11
Hi Sumit,
On Fri, Jan 15, 2021 at 05:31:41PM +0530, Sumit Garg wrote:
With the recent feature added to enable perf events to use pseudo NMIs
as interrupts on platforms which support GICv3 or later, its now been
possible to enable hard lockup detector (or NMI watchdog) on arm64
platforms. So enable corresponding support.
One thing to note here is that normally lockup detector is initialized
just after the early initcalls but PMU on arm64 comes up much later as
device_initcall(). So we need to re-initialize lockup detection once
PMU has been initialized.
Signed-off-by: Sumit Garg <redacted>
---
Hi Will,
On Tue, 26 Jan 2021 at 19:48, Will Deacon [off-list ref] wrote:
Hi Sumit,
On Fri, Jan 15, 2021 at 05:31:41PM +0530, Sumit Garg wrote:
quoted
With the recent feature added to enable perf events to use pseudo NMIs
as interrupts on platforms which support GICv3 or later, its now been
possible to enable hard lockup detector (or NMI watchdog) on arm64
platforms. So enable corresponding support.
One thing to note here is that normally lockup detector is initialized
just after the early initcalls but PMU on arm64 comes up much later as
device_initcall(). So we need to re-initialize lockup detection once
PMU has been initialized.
Signed-off-by: Sumit Garg <redacted>
---
Hi Will, Mark,
On Fri, 15 Jan 2021 at 17:32, Sumit Garg [off-list ref] wrote:
With the recent feature added to enable perf events to use pseudo NMIs
as interrupts on platforms which support GICv3 or later, its now been
possible to enable hard lockup detector (or NMI watchdog) on arm64
platforms. So enable corresponding support.
One thing to note here is that normally lockup detector is initialized
just after the early initcalls but PMU on arm64 comes up much later as
device_initcall(). So we need to re-initialize lockup detection once
PMU has been initialized.
Signed-off-by: Sumit Garg <redacted>
---
Changes in v5:
- Fix lockup_detector_init() invocation to be rather invoked from CPU
binded context as it makes heavy use of per-cpu variables and shouldn't
be invoked from preemptible context.
Do you have any further comments on this?
Lecopzer,
Does this feature work fine for you now?
-Sumit
quoted hunk
Changes in v4:
- Rebased to latest pmu v7 NMI patch-set [1] and in turn use "has_nmi"
hook to know if PMU IRQ has been requested as an NMI.
- Add check for return value prior to initializing hard-lockup detector.
[1] https://lkml.org/lkml/2020/9/24/458
Changes in v3:
- Rebased to latest pmu NMI patch-set [1].
- Addressed misc. comments from Stephen.
[1] https://lkml.org/lkml/2020/8/19/671
Changes since RFC:
- Rebased on top of Alex's WIP-pmu-nmi branch.
- Add comment for safe max. CPU frequency.
- Misc. cleanup.
arch/arm64/Kconfig | 2 ++
arch/arm64/kernel/perf_event.c | 48 ++++++++++++++++++++++++++++++++++++++++--
drivers/perf/arm_pmu.c | 5 +++++
include/linux/perf/arm_pmu.h | 2 ++
4 files changed, 55 insertions(+), 2 deletions(-)
@@ -163,6 +163,8 @@ int arm_pmu_acpi_probe(armpmu_init_fn init_fn);staticinlineintarm_pmu_acpi_probe(armpmu_init_fninit_fn){return0;}#endif+boolarm_pmu_irq_is_nmi(void);+/* Internal functions only for core arm_pmu code */structarm_pmu*armpmu_alloc(void);structarm_pmu*armpmu_alloc_atomic(void);--
Hi Will, Mark,
On Fri, 15 Jan 2021 at 17:32, Sumit Garg [off-list ref] wrote:
quoted
With the recent feature added to enable perf events to use pseudo NMIs
as interrupts on platforms which support GICv3 or later, its now been
possible to enable hard lockup detector (or NMI watchdog) on arm64
platforms. So enable corresponding support.
One thing to note here is that normally lockup detector is initialized
just after the early initcalls but PMU on arm64 comes up much later as
device_initcall(). So we need to re-initialize lockup detection once
PMU has been initialized.
Signed-off-by: Sumit Garg <redacted>
---
Changes in v5:
- Fix lockup_detector_init() invocation to be rather invoked from CPU
binded context as it makes heavy use of per-cpu variables and shouldn't
be invoked from preemptible context.
Do you have any further comments on this?
Lecopzer,
Does this feature work fine for you now?
This really fixes the warning, I have a real hardware for testing this now.
but do we need to call lockup_detector_init() for each cpu?
In init/main.c, it's only called by cpu 0 for once.
BRs,
Lecopzer
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hi Will, Mark,
On Fri, 15 Jan 2021 at 17:32, Sumit Garg [off-list ref] wrote:
quoted
With the recent feature added to enable perf events to use pseudo NMIs
as interrupts on platforms which support GICv3 or later, its now been
possible to enable hard lockup detector (or NMI watchdog) on arm64
platforms. So enable corresponding support.
One thing to note here is that normally lockup detector is initialized
just after the early initcalls but PMU on arm64 comes up much later as
device_initcall(). So we need to re-initialize lockup detection once
PMU has been initialized.
Signed-off-by: Sumit Garg <redacted>
---
Changes in v5:
- Fix lockup_detector_init() invocation to be rather invoked from CPU
binded context as it makes heavy use of per-cpu variables and shouldn't
be invoked from preemptible context.
Do you have any further comments on this?
Lecopzer,
Does this feature work fine for you now?
This really fixes the warning, I have a real hardware for testing this now.
but do we need to call lockup_detector_init() for each cpu?
In init/main.c, it's only called by cpu 0 for once.
Oh sorry, I just misread the code, please ignore previous mail.
BRs,
Lecopzer
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
On Tue, 30 Mar 2021 at 14:07, Lecopzer Chen [off-list ref] wrote:
quoted
quoted
Hi Will, Mark,
On Fri, 15 Jan 2021 at 17:32, Sumit Garg [off-list ref] wrote:
quoted
With the recent feature added to enable perf events to use pseudo NMIs
as interrupts on platforms which support GICv3 or later, its now been
possible to enable hard lockup detector (or NMI watchdog) on arm64
platforms. So enable corresponding support.
One thing to note here is that normally lockup detector is initialized
just after the early initcalls but PMU on arm64 comes up much later as
device_initcall(). So we need to re-initialize lockup detection once
PMU has been initialized.
Signed-off-by: Sumit Garg <redacted>
---
Changes in v5:
- Fix lockup_detector_init() invocation to be rather invoked from CPU
binded context as it makes heavy use of per-cpu variables and shouldn't
be invoked from preemptible context.
Do you have any further comments on this?
Lecopzer,
Does this feature work fine for you now?
This really fixes the warning, I have a real hardware for testing this now.
Thanks for the testing. I assume it as an implicit Tested-by.
quoted
but do we need to call lockup_detector_init() for each cpu?
In init/main.c, it's only called by cpu 0 for once.
Oh sorry, I just misread the code, please ignore previous mail.
Hi Will,
On Tue, 30 Mar 2021 at 18:00, Sumit Garg [off-list ref] wrote:
On Tue, 30 Mar 2021 at 14:07, Lecopzer Chen [off-list ref] wrote:
quoted
quoted
quoted
Hi Will, Mark,
On Fri, 15 Jan 2021 at 17:32, Sumit Garg [off-list ref] wrote:
quoted
With the recent feature added to enable perf events to use pseudo NMIs
as interrupts on platforms which support GICv3 or later, its now been
possible to enable hard lockup detector (or NMI watchdog) on arm64
platforms. So enable corresponding support.
One thing to note here is that normally lockup detector is initialized
just after the early initcalls but PMU on arm64 comes up much later as
device_initcall(). So we need to re-initialize lockup detection once
PMU has been initialized.
Signed-off-by: Sumit Garg <redacted>
---
Changes in v5:
- Fix lockup_detector_init() invocation to be rather invoked from CPU
binded context as it makes heavy use of per-cpu variables and shouldn't
be invoked from preemptible context.
Do you have any further comments on this?
Since there aren't any further comments, can you re-pick this feature for 5.13?
-Sumit
quoted
quoted
quoted
Lecopzer,
Does this feature work fine for you now?
This really fixes the warning, I have a real hardware for testing this now.
Thanks for the testing. I assume it as an implicit Tested-by.
quoted
quoted
but do we need to call lockup_detector_init() for each cpu?
In init/main.c, it's only called by cpu 0 for once.
Oh sorry, I just misread the code, please ignore previous mail.
From: Will Deacon <will@kernel.org> Date: 2021-04-19 17:03:43
On Mon, Apr 12, 2021 at 05:31:13PM +0530, Sumit Garg wrote:
On Tue, 30 Mar 2021 at 18:00, Sumit Garg [off-list ref] wrote:
quoted
On Tue, 30 Mar 2021 at 14:07, Lecopzer Chen [off-list ref] wrote:
quoted
quoted
quoted
On Fri, 15 Jan 2021 at 17:32, Sumit Garg [off-list ref] wrote:
quoted
With the recent feature added to enable perf events to use pseudo NMIs
as interrupts on platforms which support GICv3 or later, its now been
possible to enable hard lockup detector (or NMI watchdog) on arm64
platforms. So enable corresponding support.
One thing to note here is that normally lockup detector is initialized
just after the early initcalls but PMU on arm64 comes up much later as
device_initcall(). So we need to re-initialize lockup detection once
PMU has been initialized.
Signed-off-by: Sumit Garg <redacted>
---
Changes in v5:
- Fix lockup_detector_init() invocation to be rather invoked from CPU
binded context as it makes heavy use of per-cpu variables and shouldn't
be invoked from preemptible context.
Do you have any further comments on this?
Since there aren't any further comments, can you re-pick this feature for 5.13?
I'd still like Mark's Ack on this, as the approach you have taken doesn't
really sit with what he was suggesting.
I also don't understand how all the CPUs get initialised with your patch,
since the PMU driver will be initialised after SMP is up and running.
Will
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel