提交 07a267cd 编写于 作者: S Steven Rostedt 提交者: Thomas Gleixner

ftrace: add UNINTERRUPTIBLE state for kftraced on disable

When dynamic ftrace fails and sets itself disabled, the ftraced daemon
will go back to sleep everytime it wakes up. The setting of the
ftraced state to UNINTERRUPTIBLE is skipped in this process, and the
daemon takes up 100% of the CPU.  This patch makes sure the ftraced daemon
sets itself to UNINTERRUPTIBLE in that loop.
Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 c1d2327b
......@@ -630,10 +630,10 @@ static int ftraced(void *ignore)
{
unsigned long usecs;
set_current_state(TASK_INTERRUPTIBLE);
while (!kthread_should_stop()) {
set_current_state(TASK_INTERRUPTIBLE);
/* check once a second */
schedule_timeout(HZ);
......@@ -667,8 +667,6 @@ static int ftraced(void *ignore)
wake_up_interruptible(&ftraced_waiters);
ftrace_shutdown_replenish();
set_current_state(TASK_INTERRUPTIBLE);
}
__set_current_state(TASK_RUNNING);
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册