ing the current CPU (maybe because they
already traced the current CPU) this makes it more obvious to the
caller that they need to make sure that the current CPU ID can't
change.
Acked-by: Michal Hocko
Signed-off-by: Douglas Anderson
---
Changes in v4:
- Renamed trigger_allbutself_cpu_
ing the current CPU (maybe because they
already traced the current CPU) this makes it more obvious to the
caller that they need to make sure that the current CPU ID can't
change.
Signed-off-by: Douglas Anderson
---
Changes in v3:
- ("nmi_backtrace: Allow excluding an arbitrary CPU
e.
Reported-by: Randy Dunlap
Closes:
https://lore.kernel.org/r/af19b76d-aa4b-6c88-9cac-eae4b2072...@infradead.org
Fixes: 7ca8fe94aa92 ("watchdog/hardlockup: define HARDLOCKUP_DETECTOR_ARCH")
Signed-off-by: Douglas Anderson
---
arch/powerpc/platforms/pseries/mobility.c | 1 +
1 file chan
defined. For powerpc that's only selected if "CONFIG_PPC_BOOK3S_64" is
defined.
Fixes: 7ca8fe94aa92 ("watchdog/hardlockup: define HARDLOCKUP_DETECTOR_ARCH")
Reported-by: Michael Ellerman
Closes: https://lore.kernel.org/r/871qi5otdh.fsf@mail.lhotse
Signed-off-by: Douglas Anderson
---
LOCKUP_DETECTOR_ARCH")
Reported-by: Michael Ellerman
Closes: https://lore.kernel.org/r/871qi5otdh.fsf@mail.lhotse
Signed-off-by: Douglas Anderson
---
I'd expect that this would land in Andrew Morton's tree along with the
other lockup detector stuff.
arch/powerpc/include/asm/irq.h |
HAVE_HARDLOCKUP_DETECTOR_NON_ARCH is a mouthful and
confusing. HAVE_HARDLOCKUP_DETECTOR_PERF_OR_BUDDY is even more of a
mouthful, but probably less confusing. Rename the Kconfig names.
Signed-off-by: Douglas Anderson
---
lib/Kconfig.debug | 12 ++--
1 file changed, 6 insertions(+), 6
Signed-off-by: Douglas Anderson
---
kernel/watchdog.c | 6 --
kernel/watchdog_buddy.c | 21 +
2 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 6cc46b8e3d07..a351ab0c35eb 100644
--- a/kernel/watchdog
The dependency for HARDLOCKUP_DETECTOR_PREFER_BUDDY was more
complicated than it needed to be. If the "perf" detector is available
and we have SMP then we have a choice, so enable the config based on
just those two config items.
Suggested-by: Petr Mladek
Signed-off-by: Dougla
There's no reason to make a copy of the "watchdog_cpus" locally in
watchdog_next_cpu(). Making a copy wouldn't make things any more race
free and we're just reading the value so there's no need for a copy.
Suggested-by: Petr Mladek
Signed-off-by: Douglas Anderson
t, so we should match types.
Suggested-by: Petr Mladek
Signed-off-by: Douglas Anderson
---
include/linux/nmi.h | 4 ++--
kernel/watchdog.c | 15 +++
kernel/watchdog_buddy.c | 2 +-
3 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/include/linux/nmi.h b/incl
In the patch ("watchdog/hardlockup: add comments to
touch_nmi_watchdog()") we adjusted some comments for
touch_nmi_watchdog(). The comment about the softlockup had a typo and
were also felt to be too obvious. Remove it.
Suggested-by: Petr Mladek
Signed-off-by: Douglas Anderson
---
Suggested-by: Petr Mladek
Signed-off-by: Douglas Anderson
---
kernel/watchdog.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 32dac8028753..85f4839b6faf 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
In the patch ("watchdog/hardlockup: add a "cpu" param to
watchdog_hardlockup_check()") there was no reason to use
raw_cpu_ptr(). Using this_cpu_ptr() works fine.
Suggested-by: Petr Mladek
Signed-off-by: Douglas Anderson
---
kernel/watchdog.c | 2 +-
1 file changed, 1 inse
anup a few things that were pointed out in
review.
Douglas Anderson (10):
watchdog/hardlockup: Keep kernel.nmi_watchdog sysctl as 0444 if probe
fails
watchdog/hardlockup: HAVE_NMI_WATCHDOG must implement
watchdog_hardlockup_probe()
watchdog/hardlockup: Don't use raw_cpu_ptr() in
Implement init time detection
of perf")
Reported-by: Petr Mladek
Closes: https://lore.kernel.org/r/ZHCn4hNxFpY5-9Ki@alley
Signed-off-by: Douglas Anderson
---
include/linux/nmi.h | 6 --
kernel/watchdog.c | 30 --
2 files changed, 20 insertions(+), 16 del
by: Petr Mladek
Signed-off-by: Douglas Anderson
---
Though this does fix a minor bug, I didn't mark this as "Fixes"
because it's super minor. One could also argue that this wasn't a bug
at all but simply was never an implemented feature. The code that
added some amount
arg
Co-developed-by: Pingfan Liu
Signed-off-by: Pingfan Liu
Signed-off-by: Lecopzer Chen
Signed-off-by: Douglas Anderson
---
I yanked this patch from the mailing lists [1] into my series just to
make it easier to avoid conflicts between my series and the one adding
the arm64 perf hardlockup detec
hen
Suggested-by: Petr Mladek
Signed-off-by: Douglas Anderson
---
I yanked this patch from the mailing lists [1] into my series just to
make it easier to avoid conflicts between my series and the one adding
the arm64 perf hardlockup detector, in case someone wanted to test
them both together.
As part
On arm64, NMI support needs to be detected at runtime. Add a weak
function to the perf hardlockup detector so that an architecture can
implement it to detect whether NMIs are available.
Signed-off-by: Douglas Anderson
---
While I won't object to this patch landing, I consider it part o
arm-kernel/20220903093415.15850-1-lecopzer.c...@mediatek.com/
Signed-off-by: Colin Cross
Signed-off-by: Matthias Kaehlcke
Signed-off-by: Guenter Roeck
Signed-off-by: Tzung-Bi Shih
Signed-off-by: Douglas Anderson
---
This patch has been rebased in ChromeOS kernel trees many times, and
each time
we
tried to add the buddy lockup detector which was not arch-specific but
wanted to hook into those same functions.
This is not expected to have any functional impact.
Reviewed-by: Petr Mladek
Signed-off-by: Douglas Anderson
---
(no changes since v4)
Changes in v4:
- ("Have the perf ha
or, which isn't using NMIs. As
part of this, we sanitized a few names for consistency.
Signed-off-by: Douglas Anderson
---
Changes in v5:
- Found a few more names / comments to change.
- Tried to make names more consistent as per v4 feedback.
Changes in v4:
- ("Rename some "NMI wa
that the CPU we're running on might be different
than the one we're checking.
Currently the code in watchdog.c is guarded by
CONFIG_HARDLOCKUP_DETECTOR_PERF, which makes this change seem
silly. However, a future patch will change this.
Signed-off-by: Douglas Anderson
---
Changes in v
ted hrtimer_interrupts_saved, however,
because we end up petting all affected CPUs to make sure the new and
old CPU can't end up somehow read/write hrtimer_interrupts_saved at
the same time.
Signed-off-by: Douglas Anderson
---
Changes in v5:
- Don't dump stack on the buddy CPU if we f
returns since it seemed more symmetric.
Reviewed-by: Petr Mladek
Signed-off-by: Douglas Anderson
---
Changes in v5:
- watchdog_hardlockup_dumped_stacks => watchdog_hardlockup_all_cpu_dumped
- watchdog_hardlockup_processed => watchdog_hardlockup_warned
Changes in v4:
- ("Style ch
d as well.
This change is expected to be a no-op.
Signed-off-by: Douglas Anderson
---
Changes in v5:
- watchdog_hardlockup_interrupt_count() => watchdog_hardlockup_kick()
- watchdog_hardlockup_is_lockedup() => is_hardlockup()
Changes in v4:
- ("Move perf hardlockup checking/panic ...&
ewed-by: Petr Mladek
Signed-off-by: Douglas Anderson
---
(no changes since v4)
Changes in v4:
- ("Rename watchdog_hld.c to watchdog_perf.c") new for v4.
kernel/Makefile| 2 +-
kernel/{watchdog_hld.c => watchdog_perf.c} | 2 +-
2 files changed
x27;d like to rename these functions but that is a fairly
disruptive change touching a lot of drivers. After discussion [1] the
plan is to defer this until a good time.
[1] https://lore.kernel.org/r/ZFy0TX1tfhlH8gxj@alley
Signed-off-by: Douglas Anderson
---
Changes in v5:
- No lon
to prevent mistakes when calling the code in another
code path.
Signed-off-by: Pingfan Liu
Co-developed-by: Lecopzer Chen
Signed-off-by: Lecopzer Chen
Reviewed-by: Petr Mladek
Signed-off-by: Douglas Anderson
---
I yanked this patch from the mailing lists [1] into my series just to
make it
From: Lecopzer Chen
Nobody cares about the return value of watchdog_nmi_enable(),
changing its prototype to void.
Signed-off-by: Pingfan Liu
Signed-off-by: Lecopzer Chen
Reviewed-by: Petr Mladek
Acked-by: Nicholas Piggin
Signed-off-by: Douglas Anderson
---
I yanked this patch from the
From: Lecopzer Chen
No reference to WATCHDOG_DEFAULT, remove it.
Signed-off-by: Pingfan Liu
Signed-off-by: Lecopzer Chen
Reviewed-by: Petr Mladek
Signed-off-by: Douglas Anderson
---
I yanked this patch from the mailing lists [1] into my series just to
make it easier to avoid conflicts
itives with turbo
modes")
Signed-off-by: Douglas Anderson
---
Changes in v5:
- ("More properly prevent false ...") promoted to its own patch for v5.
kernel/watchdog_hld.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/watchdog_hld.c b/kernel/watchdog_hld
into my series for v4.
- Pulled ("change watchdog_nmi_enable() to void") into my series for v4.
- Pulled ("remove WATCHDOG_DEFAULT") into my series for v4.
- Reworked atop a whole pile of cleanups, as suggested by Petr.
Changes in v3:
- Added a note in commit message about the ef
xes: 7edaeb6841df ("kernel/watchdog: Prevent false positives with turbo
modes")
Reviewed-by: Nicholas Piggin
Reviewed-by: Petr Mladek
Signed-off-by: Douglas Anderson
---
Changes in v5:
- Add Nicholas's explanation of why this didn't break builds.
- watchdog_hardlockup_perf.c
initialized.
Co-developed-by: Sumit Garg
Signed-off-by: Sumit Garg
Co-developed-by: Pingfan Liu
Signed-off-by: Pingfan Liu
Signed-off-by: Lecopzer Chen
Signed-off-by: Douglas Anderson
---
I yanked this patch from the mailing lists [1] into my series just to
make it easier to avoid conflicts
arg
Co-developed-by: Pingfan Liu
Signed-off-by: Pingfan Liu
Signed-off-by: Lecopzer Chen
Signed-off-by: Douglas Anderson
---
I yanked this patch from the mailing lists [1] into my series just to
make it easier to avoid conflicts between my series and the one adding
the arm64 perf hardlockup detec
hen
Suggested-by: Petr Mladek
Signed-off-by: Douglas Anderson
---
I yanked this patch from the mailing lists [1] into my series just to
make it easier to avoid conflicts between my series and the one adding
the arm64 perf hardlockup detector, in case someone wanted to test
them both together.
As part
On arm64, NMI support needs to be detected at runtime. Add a weak
function to the perf hardlockup detector so that an architecture can
implement it to detect whether NMIs are available.
Signed-off-by: Douglas Anderson
---
While I won't object to this patch landing, I consider it part o
ps://lore.kernel.org/linux-arm-kernel/20220903093415.15850-1-lecopzer.c...@mediatek.com/
Signed-off-by: Colin Cross
Signed-off-by: Matthias Kaehlcke
Signed-off-by: Guenter Roeck
Signed-off-by: Tzung-Bi Shih
Signed-off-by: Douglas Anderson
---
This patch has been rebased in ChromeOS kernel trees many
we
tried to add the buddy lockup detector which was not arch-specific but
wanted to hook into those same functions.
This is not expected to have any functional impact.
Signed-off-by: Douglas Anderson
---
Changes in v4:
- ("Have the perf hardlockup use __weak ...") new for v4.
includ
x27;t using NMIs.
Signed-off-by: Douglas Anderson
---
Changes in v4:
- ("Rename some "NMI watchdog" constants/function ...") new for v4.
arch/powerpc/include/asm/nmi.h| 4 +-
arch/powerpc/kernel/watchdog.c| 12 ++---
arch/powerpc/platforms/pseries
pets super fast. The new behavior
of handling super-fast perf before clearing watchdog pets seems
better.
Signed-off-by: Douglas Anderson
---
Changes in v4:
- ("Move perf hardlockup watchdog petting to watchdog.c") new for v4.
include/linux/nmi.h| 5 +++-
In preparation for the buddy hardlockup detector where the CPU
checking for lockup might not be the currently running CPU, add a
"cpu" parameter to watchdog_hardlockup_check().
Signed-off-by: Douglas Anderson
---
Changes in v4:
- ("Add a "cpu" param to watchdog_hardlo
rns since it seemed more symmetric.
Signed-off-by: Douglas Anderson
---
Changes in v4:
- ("Style changes to watchdog_hardlockup_check ...") new for v4.
kernel/watchdog.c | 32 +++-
1 file changed, 15 insertions(+), 17 deletions(-)
diff --git a/kernel/wat
ounting to only be
there if the perf hardlockup detector is configured as well.
This change is expected to be a no-op.
Signed-off-by: Douglas Anderson
---
Changes in v4:
- ("Move perf hardlockup checking/panic ...") new for v4.
include/linux/nmi.h| 5 ++-
kernel/watchdog.c
f.
It could be argued that the new name makes it less obvious that this
is a hardlockup detector. While true, it's not hard to remember that
the "perf" detector is always a hardlockup detector and it's nice not
to have names that are too convoluted.
Signed-off-by: Douglas Ander
ned-off-by: Douglas Anderson
---
Changes in v4:
- ("Rename touch_nmi_watchdog() to ...") new for v4.
include/linux/nmi.h | 27 ++-
1 file changed, 22 insertions(+), 5 deletions(-)
diff --git a/include/linux/nmi.h b/include/linux/nmi.h
index 454fe99c4874..35d09
to prevent mistakes when calling the code in another
code path.
Signed-off-by: Pingfan Liu
Co-developed-by: Lecopzer Chen
Signed-off-by: Lecopzer Chen
Reviewed-by: Petr Mladek
Signed-off-by: Douglas Anderson
---
I yanked this patch from the mailing lists [1] into my series just to
make it
From: Lecopzer Chen
Nobody cares about the return value of watchdog_nmi_enable(),
changing its prototype to void.
Signed-off-by: Pingfan Liu
Signed-off-by: Lecopzer Chen
Reviewed-by: Petr Mladek
Signed-off-by: Douglas Anderson
---
I yanked this patch from the mailing lists [1] into my
From: Lecopzer Chen
No reference to WATCHDOG_DEFAULT, remove it.
Signed-off-by: Pingfan Liu
Signed-off-by: Lecopzer Chen
Reviewed-by: Petr Mladek
Signed-off-by: Douglas Anderson
---
I yanked this patch from the mailing lists [1] into my series just to
make it easier to avoid conflicts
hat quite
right. While this doesn't appear to be a huge deal, it's nice to make
it consistent.
Fixes: 7edaeb6841df ("kernel/watchdog: Prevent false positives with turbo
modes")
Signed-off-by: Douglas Anderson
---
Changes in v4:
- ("Define dummy watchdog_update_hrtimer
LT") into my series for v4.
- Reworked atop a whole pile of cleanups, as suggested by Petr.
Changes in v3:
- Added a note in commit message about the effect on idle.
- Cleaned up commit message pros/cons to be complete sentences.
- More cpu => CPU (in Kconfig and comments).
- No code changes
db_nmicallback() if !CONFIG_KGDB" new for v8
- "Fallback to a regular IPI if NMI isn't enabled" new for v8
Douglas Anderson (3):
arm64: idle: Tag the arm64 idle functions as __cpuidle
kgdb: Provide a stub kgdb_nmicallback() if !CONFIG_KGDB
arm64: ipi_nmi: Fallback to a regul
arm64 supporting pseudo NMIs
feature which is only available on platforms which have support for GICv3
or later version.
Signed-off-by: Sumit Garg
Tested-by: Chen-Yu Tsai
Signed-off-by: Douglas Anderson
---
Changes in v8:
- Add loongarch support, too
arch/arm/include/asm/irq.h | 2
try to round it up
again and potentially hang when we try to grab the csd lock. That's
not new behavior but we'll still try to do better in a future patch.
Suggested-by: Daniel Thompson
Signed-off-by: Douglas Anderson
Cc: Vineet Gupta
Cc: Russell King
Cc: Catalin Marinas
Cc: Will
st did local_irq_enable() and local_irq_disable() without
looking at them. So we can definitely remove the flags.
Signed-off-by: Douglas Anderson
Cc: Vineet Gupta
Cc: Russell King
Cc: Catalin Marinas
Cc: Will Deacon
Cc: Richard Kuo
Cc: Ralf Baechle
Cc: Paul Burton
Cc: James Hogan
Cc: Be
ce on a cpu that didn't round up new for v3.
Changes in v2:
- Removing irq flags separated from fixing lockdep splat.
- Don't use smp_call_function (Daniel).
Douglas Anderson (4):
kgdb: Remove irq flags from roundup
kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_functio
try to round it up
again and potentially hang when we try to grab the csd lock. That's
not new behavior but we'll still try to do better in a future patch.
Suggested-by: Daniel Thompson
Signed-off-by: Douglas Anderson
---
Changes in v6:
- Moved smp_call_function_single_async() erro
st did local_irq_enable() and local_irq_disable() without
looking at them. So we can definitely remove the flags.
Signed-off-by: Douglas Anderson
Acked-by: Will Deacon
---
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2:
- Removing irq flags separated from
n v2:
- Removing irq flags separated from fixing lockdep splat.
- Don't use smp_call_function (Daniel).
Douglas Anderson (4):
kgdb: Remove irq flags from roundup
kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function()
kgdb: Don't round up a CPU that failed rounding
try to round it up
again and potentially hang when we try to grab the csd lock. That's
not new behavior but we'll still try to do better in a future patch.
Suggested-by: Daniel Thompson
Signed-off-by: Douglas Anderson
---
Changes in v5:
- Add a comment about get_irq_regs().
- get_c
st did local_irq_enable() and local_irq_disable() without
looking at them. So we can definitely remove the flags.
Signed-off-by: Douglas Anderson
Acked-by: Will Deacon
---
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2:
- Removing irq flags separated from fixing lockdep
uot;failed to roundup" case.
- Document the ignored parameter.
- Don't round up a CPU that failed rounding up before new for v3.
- Don't back trace on a cpu that didn't round up new for v3.
Changes in v2:
- Removing irq flags separated from fixing lockdep splat.
- Don't use
try to round it up
again and potentially hang when we try to grab the csd lock. That's
not new behavior but we'll still try to do better in a future patch.
Suggested-by: Daniel Thompson
Signed-off-by: Douglas Anderson
---
Changes in v4: None
Changes in v3:
- No separate init call.
- D
st did local_irq_enable() and local_irq_disable() without
looking at them. So we can definitely remove the flags.
Signed-off-by: Douglas Anderson
---
Changes in v4: None
Changes in v3: None
Changes in v2:
- Removing irq flags separated from fixing lockdep splat.
arch/arc/kernel/kgdb.c | 2 +-
ar
Changes in v2:
- Removing irq flags separated from fixing lockdep splat.
- Don't use smp_call_function (Daniel).
Douglas Anderson (4):
kgdb: Remove irq flags from roundup
kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function()
kgdb: Don't round up a CPU that failed roun
try to round it up
again and potentially hang when we try to grab the csd lock. That's
not new behavior but we'll still try to do better in a future patch.
Suggested-by: Daniel Thompson
Signed-off-by: Douglas Anderson
---
Changes in v3:
- No separate init call.
- Don't round
st did local_irq_enable() and local_irq_disable() without
looking at them. So we can definitely remove the flags.
Signed-off-by: Douglas Anderson
---
Changes in v3: None
Changes in v2:
- Removing irq flags separated from fixing lockdep splat.
arch/arc/kernel/kgdb.c | 2 +-
arch/arm/kernel/kgdb.c
irq flags separated from fixing lockdep splat.
- Removing irq flags separated from fixing lockdep splat.
- Don't use smp_call_function (Daniel).
Douglas Anderson (4):
kgdb: Remove irq flags from roundup
kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function()
kgdb: Don
to. Specifically:
* For arch/arc we passed NULL to kgdb_nmicallback() instead of
get_irq_regs().
* For arch/mips there was a bit of extra code around
kgdb_nmicallback()
Suggested-by: Daniel Thompson
Signed-off-by: Douglas Anderson
---
Changes in v2:
- Removing irq flags separated fr
st did local_irq_enable() and local_irq_disable() without
looking at them. So we can definitely remove the flags.
Signed-off-by: Douglas Anderson
---
Changes in v2:
- Removing irq flags separated from fixing lockdep splat.
arch/arc/kernel/kgdb.c | 2 +-
arch/arm/kernel/kgdb.c | 2 +-
arch
separated from fixing lockdep splat.
- Don't use smp_call_function (Daniel).
Douglas Anderson (2):
kgdb: Remove irq flags from roundup
kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function()
arch/arc/kernel/kgdb.c | 10 ++
arch/arm/kernel/kgdb.c | 12
d.
If folks are OK w/ the 'smp' patch it probably should go in some core
kernel tree. The kgdb patch won't work without it, though, so to land
that we'd need coordination between the folks landing that and the
folks landing the 'smp' patch.
Douglas Anderson (7):
se
le() calls from all of the kgdb_roundup_cpus() calls.
Signed-off-by: Douglas Anderson
---
arch/arc/kernel/kgdb.c | 4 +---
arch/arm/kernel/kgdb.c | 4 +---
arch/arm64/kernel/kgdb.c | 4 +---
arch/hexagon/kernel/kgdb.c | 11 ++-
arch/mips/kernel/kgdb.c| 4 +---
arch/p
with a
deadlock of its own.
Signed-off-by: Douglas Anderson
---
kernel/smp.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/smp.c b/kernel/smp.c
index 163c451af42e..bb581e58c8dc 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -19,6 +19,7 @@
#include
#include
75 matches
Mail list logo