public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] improve handling of errors returned by kthread_park()
@ 2015-09-28 20:44 Ulrich Obergfell
  2015-09-28 20:44 ` [PATCH 1/5] watchdog: fix error handling in proc_watchdog_thresh() Ulrich Obergfell
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Ulrich Obergfell @ 2015-09-28 20:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, dzickus, atomlin, uobergfe

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:

- 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


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-10-12 21:13 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-28 20:44 [PATCH 0/5] improve handling of errors returned by kthread_park() Ulrich Obergfell
2015-09-28 20:44 ` [PATCH 1/5] watchdog: fix error handling in proc_watchdog_thresh() Ulrich Obergfell
2015-09-29  6:39   ` Aaron Tomlin
2015-09-28 20:44 ` [PATCH 2/5] watchdog: move watchdog_disable_all_cpus() outside of ifdef Ulrich Obergfell
2015-09-29  6:40   ` Aaron Tomlin
2015-09-29 23:37   ` Andrew Morton
2015-09-28 20:44 ` [PATCH 3/5] watchdog: implement error handling in update_watchdog_all_cpus() and callers Ulrich Obergfell
2015-09-29  6:40   ` Aaron Tomlin
2015-09-28 20:44 ` [PATCH 4/5] watchdog: implement error handling in lockup_detector_suspend() Ulrich Obergfell
2015-09-29  6:41   ` Aaron Tomlin
2015-09-28 20:44 ` [PATCH 5/5] watchdog: do not unpark threads in watchdog_park_threads() on error Ulrich Obergfell
2015-09-29  6:41   ` Aaron Tomlin
2015-09-29 23:30 ` [PATCH 0/5] improve handling of errors returned by kthread_park() Andrew Morton
2015-09-30 10:54   ` Ulrich Obergfell
2015-10-12 21:13 ` Don Zickus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox