diff mbox series

powerpc/pseries: Enable hardlockup watchdog for PowerVM partitions

Message ID 20210503111822.758423-1-npiggin@gmail.com (mailing list archive)
State Changes Requested
Headers show
Series powerpc/pseries: Enable hardlockup watchdog for PowerVM partitions | expand
Related show

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch powerpc/merge (e3a9b9d6a03f5fbf99b540e863b001d46ba1735c)
snowpatch_ozlabs/build-ppc64le success Build succeeded
snowpatch_ozlabs/build-ppc64be success Build succeeded
snowpatch_ozlabs/build-ppc64e fail Build failed!
snowpatch_ozlabs/build-pmac32 success Build succeeded
snowpatch_ozlabs/checkpatch success total: 0 errors, 0 warnings, 0 checks, 20 lines checked
snowpatch_ozlabs/needsstable success Patch has no Fixes tags

Commit Message

Nicholas Piggin May 3, 2021, 11:18 a.m. UTC
PowerVM will not arbitrarily oversubscribe or stop guests, page out the
guest kernel text to a NFS volume connected by carrier pigeon to abacus
based storage, etc., as a KVM host might. So PowerVM guests are not
likely to be killed by the hard lockup watchdog in normal operation,
even with shared processor LPARs which still get a minimum allotment of
CPU time.

Enable the hard lockup detector by default on !KVM guests, which we will
assume is PowerVM. It has been useful in finding problems on bare metal
kernels.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 arch/powerpc/kernel/setup_64.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

Michael Ellerman June 25, 2021, 6:21 a.m. UTC | #1
On Mon, 3 May 2021 21:18:22 +1000, Nicholas Piggin wrote:
> PowerVM will not arbitrarily oversubscribe or stop guests, page out the
> guest kernel text to a NFS volume connected by carrier pigeon to abacus
> based storage, etc., as a KVM host might. So PowerVM guests are not
> likely to be killed by the hard lockup watchdog in normal operation,
> even with shared processor LPARs which still get a minimum allotment of
> CPU time.
> 
> [...]

Applied to powerpc/next.

[1/1] powerpc/pseries: Enable hardlockup watchdog for PowerVM partitions
      https://git.kernel.org/powerpc/c/633c8e9800f3884a26b2af59be8ce27696ad6ebf

cheers
diff mbox series

Patch

diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index b779d25761cf..c0e234456863 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -939,15 +939,17 @@  u64 hw_nmi_get_sample_period(int watchdog_thresh)
  * disable it by default. Book3S has a soft-nmi hardlockup detector based
  * on the decrementer interrupt, so it does not suffer from this problem.
  *
- * It is likely to get false positives in VM guests, so disable it there
- * by default too.
+ * It is likely to get false positives in KVM guests, so disable it there
+ * by default too. PowerVM will not stop or arbitrarily oversubscribe
+ * CPUs, but give a minimum regular allotment even with SPLPAR, so enable
+ * the detector for non-KVM guests, assume PowerVM.
  */
 static int __init disable_hardlockup_detector(void)
 {
 #ifdef CONFIG_HARDLOCKUP_DETECTOR_PERF
 	hardlockup_detector_disable();
 #else
-	if (firmware_has_feature(FW_FEATURE_LPAR))
+	if (is_kvm_guest())
 		hardlockup_detector_disable();
 #endif