* [PATCH] check_hung_task(): unsigned sysctl_hung_task_warnings cannot be less than 0
@ 2008-12-02 21:55 Roel Kluin
2008-12-03 9:12 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2008-12-02 21:55 UTC (permalink / raw)
To: Ingo Molnar; +Cc: lkml
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--;
diff --git a/kernel/softlockup.c b/kernel/softlockup.c
index 3953e4a..a50a5db 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 == -1)
return;
sysctl_hung_task_warnings--;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] check_hung_task(): unsigned sysctl_hung_task_warnings cannot be less than 0
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
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-12-03 9:12 UTC (permalink / raw)
To: Roel Kluin; +Cc: lkml
* 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--;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-12-03 9:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox