Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751612AbdHaHbe (ORCPT ); Thu, 31 Aug 2017 03:31:34 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:58700 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751346AbdHaHb3 (ORCPT ); Thu, 31 Aug 2017 03:31:29 -0400 Message-Id: <20170831071558.995235362@linutronix.de> User-Agent: quilt/0.63-1 Date: Thu, 31 Aug 2017 09:15:58 +0200 From: Thomas Gleixner To: LKML Cc: Peter Zijlstra , Ingo Molnar , Andrew Morton , Borislav Petkov , Sebastian Siewior , Nicholas Piggin , Don Zickus , Chris Metcalf , Ulrich Obergfell Subject: [patch 00/29] lockup_detector: Cure hotplug deadlocks and replace duct tape Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1837 Lines: 46 The lockup detector is broken is several ways: - It's deadlock prone vs. CPU hotplug in various ways. Some of these are due to recursive cpus_read_lock() others are due to cpus_read_lock() from CPU hotplug callbacks which immediately lock the machine because cpus are write locked. - The handling of the cpu hotplug threads happens sideways to the smpboot thread infrastructure, which is racy and pointless - The handling of the user space sysctl interface is a complete trainwreck as it fiddles directly with variables which can be modified or evaluated by the running watchdogs. - The perf event initialization is a steaming pile of duct tape as it idiotically tries to create perf events over and over even if perf is not functional (no hardware, ....). To avoid excessive dmesg spam it contains magic printk ratelimiting along with either wrong or useless messages. - The code structure is horrible as ifdef sections are scattered all over the place which makes it unreadable - There is more wreckage, but see the changelogs for the ugly details. Before I get utterly grumpy, I just pretend that I don't give a sh*t! The following series sanitizes the facility and addresses the problems. Thanks, tglx --- arch/parisc/kernel/process.c | 2 arch/powerpc/kernel/watchdog.c | 22 - arch/x86/events/intel/core.c | 11 include/linux/nmi.h | 121 +++---- include/linux/smpboot.h | 4 kernel/cpu.c | 6 kernel/smpboot.c | 22 - kernel/sysctl.c | 22 - kernel/watchdog.c | 638 ++++++++++++++--------------------------- kernel/watchdog_hld.c | 193 ++++++------ 10 files changed, 433 insertions(+), 608 deletions(-)