hung_task: add method to reset detector
In certain occasions it is possible for a hung task detector positive to be false: continuation from a paused VM, for example. Add a method to reset detection, similar as is done with other kernel watchdogs. Acked-by: Don Zickus <dzickus@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Gleb Natapov <gleb@redhat.com>
This commit is contained in:

committed by
Gleb Natapov

parent
d63285e94a
commit
8b414521bc
@@ -203,6 +203,14 @@ int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static atomic_t reset_hung_task = ATOMIC_INIT(0);
|
||||
|
||||
void reset_hung_task_detector(void)
|
||||
{
|
||||
atomic_set(&reset_hung_task, 1);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(reset_hung_task_detector);
|
||||
|
||||
/*
|
||||
* kthread which checks for tasks stuck in D state
|
||||
*/
|
||||
@@ -216,6 +224,9 @@ static int watchdog(void *dummy)
|
||||
while (schedule_timeout_interruptible(timeout_jiffies(timeout)))
|
||||
timeout = sysctl_hung_task_timeout_secs;
|
||||
|
||||
if (atomic_xchg(&reset_hung_task, 0))
|
||||
continue;
|
||||
|
||||
check_hung_uninterruptible_tasks(timeout);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user