From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-x241.google.com (mail-io0-x241.google.com [IPv6:2607:f8b0:4001:c06::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3y5Wmj20j0zDqhf for ; Tue, 3 Oct 2017 06:04:20 +1100 (AEDT) Received: by mail-io0-x241.google.com with SMTP id n69so3602400ioi.3 for ; Mon, 02 Oct 2017 12:04:20 -0700 (PDT) MIME-Version: 1.0 Sender: linus971@gmail.com In-Reply-To: References: From: Linus Torvalds Date: Mon, 2 Oct 2017 12:04:17 -0700 Message-ID: Subject: Re: [RFC GIT Pull] core watchdog sanitizing To: Thomas Gleixner Cc: LKML , Ingo Molnar , "H. Peter Anvin" , Peter Zijlstra , Don Zickus , Benjamin Herrenschmidt , Michael Ellerman , Nicholas Piggin , ppc-dev Content-Type: text/plain; charset="UTF-8" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, Oct 2, 2017 at 11:46 AM, Thomas Gleixner wrote: > > I agree that adding that 'run' argument was certainly not a piece of > art. Though I disagree with the sentiment that non-functional garbage is > preferrable over functionally correct code which merily contains a bad > implementation choice. I agree that it's somewhat arbitrary, but I also find it really hard to vet code where my initial reaction is just "this is too ugly". So it may be superficial, but .. > Enough vented. Find below the cure for that major offense. Looks much better to me. Thanks. Side note: would it perhaps make sense to have that cpus_read_lock/unlock() sequence around the whole reconfiguration section? Because while looking at that sequence, it looks a bit odd to me that cpu's can come and go in the middle of the nmi watchdog reconfiguration sequence. In particular, what happens if a new CPU is brought up just as the NMI matchdog is being reconfigured? The NMI's have been stopped for the old CPU's, what happens for the new one that came up in between that watchdog_nmi_stop/start? This may be all obviously safe, I'm just asking for clarification. Linus