All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] check_hung_task(): unsigned sysctl_hung_task_warnings cannot be less than 0
Date: Wed, 3 Dec 2008 10:12:30 +0100	[thread overview]
Message-ID: <20081203091230.GG5668@elte.hu> (raw)
In-Reply-To: <4935AEDA.5020504@gmail.com>


* Roel Kluin <roel.kluin@gmail.com> wrote:

> unsigned sysctl_hung_task_warnings cannot be less than 0
> 
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> in kernel/softlockup.c
> 
> unsigned long __read_mostly sysctl_hung_task_warnings = 10;
> ...
> static void check_hung_task()
> {
> ...
>         if (sysctl_hung_task_warnings < 0)
> 		return
>         sysctl_hung_task_warnings--;

applied to tip/core/urgent, thanks Roel!

Note, i changed the check to !0 instead - see below.

	Ingo

-------------->
>From 201955463a5c1a70d3f70d1598b27e4c2c402642 Mon Sep 17 00:00:00 2001
From: Roel Kluin <roel.kluin@gmail.com>
Date: Tue, 2 Dec 2008 22:55:38 +0100
Subject: [PATCH] check_hung_task(): unsigned sysctl_hung_task_warnings cannot be less than 0

Impact: fix warnings-limit cutoff check for debug feature

unsigned sysctl_hung_task_warnings cannot be less than 0

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 kernel/softlockup.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/softlockup.c b/kernel/softlockup.c
index 3953e4a..dc0b3be 100644
--- a/kernel/softlockup.c
+++ b/kernel/softlockup.c
@@ -188,7 +188,7 @@ static void check_hung_task(struct task_struct *t, unsigned long now)
 	if ((long)(now - t->last_switch_timestamp) <
 					sysctl_hung_task_timeout_secs)
 		return;
-	if (sysctl_hung_task_warnings < 0)
+	if (!sysctl_hung_task_warnings)
 		return;
 	sysctl_hung_task_warnings--;
 


      reply	other threads:[~2008-12-03  9:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-02 21:55 [PATCH] check_hung_task(): unsigned sysctl_hung_task_warnings cannot be less than 0 Roel Kluin
2008-12-03  9:12 ` Ingo Molnar [this message]

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=20081203091230.GG5668@elte.hu \
    --to=mingo@elte.hu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roel.kluin@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.