public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Aaron Tomlin <atomlin@redhat.com>
To: Ulrich Obergfell <uobergfe@redhat.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	dzickus@redhat.com
Subject: Re: [PATCH 5/5] watchdog: do not unpark threads in watchdog_park_threads() on error
Date: Tue, 29 Sep 2015 07:41:51 +0100	[thread overview]
Message-ID: <20150929064151.GK25024@atomlin.usersys.redhat.com> (raw)
In-Reply-To: <1443473052-3053-6-git-send-email-uobergfe@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1597 bytes --]

On Mon 2015-09-28 22:44 +0200, Ulrich Obergfell wrote:
> If kthread_park() returns an error, watchdog_park_threads() should not
> blindly 'roll back' the already parked threads to the unparked state.
> Instead leave it up to the callers to handle such errors appropriately
> in their context. For example, it is redundant to unpark the threads
> if the lockup detectors will soon be disabled by the callers anyway.
> 
> Signed-off-by: Ulrich Obergfell <uobergfe@redhat.com>
> ---
>  kernel/watchdog.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/kernel/watchdog.c b/kernel/watchdog.c
> index 3bc22a9..af70bf2 100644
> --- a/kernel/watchdog.c
> +++ b/kernel/watchdog.c
> @@ -654,6 +654,12 @@ static struct smp_hotplug_thread watchdog_threads = {
>  
>  /*
>   * park all watchdog threads that are specified in 'watchdog_cpumask'
> + *
> + * This function returns an error if kthread_park() of a watchdog thread
> + * fails. In this situation, the watchdog threads of some CPUs can already
> + * be parked and the watchdog threads of other CPUs can still be runnable.
> + * Callers are expected to handle this special condition as appropriate in
> + * their context.
>   */
>  static int watchdog_park_threads(void)
>  {
> @@ -665,10 +671,6 @@ static int watchdog_park_threads(void)
>  		if (ret)
>  			break;
>  	}
> -	if (ret) {
> -		for_each_watchdog_cpu(cpu)
> -			kthread_unpark(per_cpu(softlockup_watchdog, cpu));
> -	}
>  	put_online_cpus();
>  
>  	return ret;

Reviewed-by: Aaron Tomlin <atomlin@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-09-29  6:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=20150929064151.GK25024@atomlin.usersys.redhat.com \
    --to=atomlin@redhat.com \
    --cc=akpm@linux-foundation.org \
    --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