mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Ulrich Obergfell <uobergfe@redhat.com>
Cc: linux-kernel@vger.kernel.org, dzickus@redhat.com, atomlin@redhat.com
Subject: Re: [PATCH 0/5] improve handling of errors returned by kthread_park()
Date: Tue, 29 Sep 2015 16:30:36 -0700	[thread overview]
Message-ID: <20150929163036.a1260608ab9b13273eebf9cb@linux-foundation.org> (raw)
In-Reply-To: <1443473052-3053-1-git-send-email-uobergfe@redhat.com>

On Mon, 28 Sep 2015 22:44:07 +0200 Ulrich Obergfell <uobergfe@redhat.com> 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:
> 
> - 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
> 

hm, you made me look at kthread parking.  Why does it exist?  What is a
"parked" thread anyway, and how does it differ from, say, a sleeping
one?  The 2a1d446019f9a5983ec5a335b changelog is pretty useless and the
patch added no useful documentation, sigh.

Anwyay...  what inspired this patchset?  Are you experiencing
kthread_park() failures in practice?  If so, what is causing them?  And
what is the user-visible effect of these failures?  This is all pretty
important context for such a patchset.



  parent reply	other threads:[~2015-09-29 23:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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
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 ` Andrew Morton [this message]
2015-09-30 10:54   ` [PATCH 0/5] improve handling of errors returned by kthread_park() Ulrich Obergfell
2015-10-12 21:13 ` Don Zickus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150929163036.a1260608ab9b13273eebf9cb@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=atomlin@redhat.com \
    --cc=dzickus@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=uobergfe@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®