From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752622AbbJLVN6 (ORCPT ); Mon, 12 Oct 2015 17:13:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55768 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752556AbbJLVN4 (ORCPT ); Mon, 12 Oct 2015 17:13:56 -0400 Date: Mon, 12 Oct 2015 17:13:54 -0400 From: Don Zickus To: Ulrich Obergfell Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, atomlin@redhat.com Subject: Re: [PATCH 0/5] improve handling of errors returned by kthread_park() Message-ID: <20151012211354.GA209762@redhat.com> References: <1443473052-3053-1-git-send-email-uobergfe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1443473052-3053-1-git-send-email-uobergfe@redhat.com> User-Agent: Mutt/1.5.20 (2009-12-10) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 28, 2015 at 10:44:07PM +0200, Ulrich Obergfell wrote: > The original watchdog_park_threads() function that was introduced by > commit 81a4beef91ba4a9e8ad6054ca9933dff7e25ff28 takes a very simple > approach to handle errors returned by kthread_park(): It attempts to > roll back all watchdog threads to the unparked state. However, this > may be undesired behaviour from the perspective of the caller which > may want to handle errors as appropriate in its specific context. > Currently, there are two possible call chains: I spent a little time cleaning up some of my test scripts for this code. Things seem to work well. Hardlockups and softlockups work along with enabling/disabling the various lockup knobs. Acked-by: Don Zickus > > - watchdog suspend/resume interface > > lockup_detector_suspend > watchdog_park_threads > > - write to parameters in /proc/sys/kernel > > proc_watchdog_update > watchdog_enable_all_cpus > update_watchdog_all_cpus > watchdog_park_threads > > Instead of 'blindly' attempting to unpark the watchdog threads if a > kthread_park() call fails, the new approach is to disable the lockup > detectors in the above call chains. Failure becomes visible to the > user as follows: > > - error messages from lockup_detector_suspend() > or watchdog_enable_all_cpus() > > - the state that can be read from /proc/sys/kernel/watchdog_enabled > > - the 'write' system call in the latter call chain returns an error > > Ulrich Obergfell (5): > watchdog: fix error handling in proc_watchdog_thresh() > watchdog: move watchdog_disable_all_cpus() outside of ifdef > watchdog: implement error handling in update_watchdog_all_cpus() and > callers > watchdog: implement error handling in lockup_detector_suspend() > watchdog: do not unpark threads in watchdog_park_threads() on error > > kernel/watchdog.c | 60 +++++++++++++++++++++++++++++++++++++++---------------- > 1 file changed, 43 insertions(+), 17 deletions(-) > > -- > 1.7.11.7 >