diff options
-rw-r--r-- | arch/x86/kernel/pvclock.c | 1 | ||||
-rw-r--r-- | include/linux/sched.h | 8 | ||||
-rw-r--r-- | kernel/hung_task.c | 11 |
3 files changed, 20 insertions, 0 deletions
diff --git a/arch/x86/kernel/pvclock.c b/arch/x86/kernel/pvclock.c index 6279928c0a71..2f355d229a58 100644 --- a/arch/x86/kernel/pvclock.c +++ b/arch/x86/kernel/pvclock.c | |||
@@ -48,6 +48,7 @@ void pvclock_touch_watchdogs(void) | |||
48 | touch_softlockup_watchdog_sync(); | 48 | touch_softlockup_watchdog_sync(); |
49 | clocksource_touch_watchdog(); | 49 | clocksource_touch_watchdog(); |
50 | rcu_cpu_stall_reset(); | 50 | rcu_cpu_stall_reset(); |
51 | reset_hung_task_detector(); | ||
51 | } | 52 | } |
52 | 53 | ||
53 | static atomic64_t last_value = ATOMIC64_INIT(0); | 54 | static atomic64_t last_value = ATOMIC64_INIT(0); |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 6682da36b293..7bb4b4a2a101 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -285,6 +285,14 @@ static inline void lockup_detector_init(void) | |||
285 | } | 285 | } |
286 | #endif | 286 | #endif |
287 | 287 | ||
288 | #ifdef CONFIG_DETECT_HUNG_TASK | ||
289 | void reset_hung_task_detector(void); | ||
290 | #else | ||
291 | static inline void reset_hung_task_detector(void) | ||
292 | { | ||
293 | } | ||
294 | #endif | ||
295 | |||
288 | /* Attach to any functions which should be ignored in wchan output. */ | 296 | /* Attach to any functions which should be ignored in wchan output. */ |
289 | #define __sched __attribute__((__section__(".sched.text"))) | 297 | #define __sched __attribute__((__section__(".sched.text"))) |
290 | 298 | ||
diff --git a/kernel/hung_task.c b/kernel/hung_task.c index 3e97fb126e6b..dfdf51534b3e 100644 --- a/kernel/hung_task.c +++ b/kernel/hung_task.c | |||
@@ -203,6 +203,14 @@ int proc_dohung_task_timeout_secs(struct ctl_table *table, int write, | |||
203 | return ret; | 203 | return ret; |
204 | } | 204 | } |
205 | 205 | ||
206 | static atomic_t reset_hung_task = ATOMIC_INIT(0); | ||
207 | |||
208 | void reset_hung_task_detector(void) | ||
209 | { | ||
210 | atomic_set(&reset_hung_task, 1); | ||
211 | } | ||
212 | EXPORT_SYMBOL_GPL(reset_hung_task_detector); | ||
213 | |||
206 | /* | 214 | /* |
207 | * kthread which checks for tasks stuck in D state | 215 | * kthread which checks for tasks stuck in D state |
208 | */ | 216 | */ |
@@ -216,6 +224,9 @@ static int watchdog(void *dummy) | |||
216 | while (schedule_timeout_interruptible(timeout_jiffies(timeout))) | 224 | while (schedule_timeout_interruptible(timeout_jiffies(timeout))) |
217 | timeout = sysctl_hung_task_timeout_secs; | 225 | timeout = sysctl_hung_task_timeout_secs; |
218 | 226 | ||
227 | if (atomic_xchg(&reset_hung_task, 0)) | ||
228 | continue; | ||
229 | |||
219 | check_hung_uninterruptible_tasks(timeout); | 230 | check_hung_uninterruptible_tasks(timeout); |
220 | } | 231 | } |
221 | 232 | ||