diff options
author | Steven Rostedt <srostedt@redhat.com> | 2008-05-12 15:20:55 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-05-23 15:15:42 -0400 |
commit | 07a267cdd2fd7d1de9455b1e36a1635ace7276c7 (patch) | |
tree | 886495b48c0e10866aa92e61e0dbd247a7e80e25 | |
parent | c1d2327b36f2261ffa8ff7227321ba900c7eee7f (diff) |
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: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | kernel/trace/ftrace.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 281d97a3208c..40f64f7cd850 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -630,10 +630,10 @@ static int ftraced(void *ignore) | |||
630 | { | 630 | { |
631 | unsigned long usecs; | 631 | unsigned long usecs; |
632 | 632 | ||
633 | set_current_state(TASK_INTERRUPTIBLE); | ||
634 | |||
635 | while (!kthread_should_stop()) { | 633 | while (!kthread_should_stop()) { |
636 | 634 | ||
635 | set_current_state(TASK_INTERRUPTIBLE); | ||
636 | |||
637 | /* check once a second */ | 637 | /* check once a second */ |
638 | schedule_timeout(HZ); | 638 | schedule_timeout(HZ); |
639 | 639 | ||
@@ -667,8 +667,6 @@ static int ftraced(void *ignore) | |||
667 | wake_up_interruptible(&ftraced_waiters); | 667 | wake_up_interruptible(&ftraced_waiters); |
668 | 668 | ||
669 | ftrace_shutdown_replenish(); | 669 | ftrace_shutdown_replenish(); |
670 | |||
671 | set_current_state(TASK_INTERRUPTIBLE); | ||
672 | } | 670 | } |
673 | __set_current_state(TASK_RUNNING); | 671 | __set_current_state(TASK_RUNNING); |
674 | return 0; | 672 | return 0; |