Commit:     1c6b4aa94576eee6dec3b8011f60d7f666db90b0
Parent:     85653af7d488702165eba72c6c1dd0250fae4e70
Author:     Satoru Takeuchi <[EMAIL PROTECTED]>
AuthorDate: Sun Jul 15 23:39:48 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon Jul 16 09:05:41 2007 -0700

    cpu hotplug: fix ksoftirqd termination on cpu hotplug with naughty realtime 
    Fix ksoftirqd termination on cpu hotplug with naughty real time process.
    Assuming the following case:
     - Try to hot remove CPU2 from CPU1.
     - There is a real time process on CPU2, and that process doesn't sleep at 
     - That rt process and ksoftirqd/2 is migrated to the CPU0
    Then ksoftirqd/2 can't stop becasue that rt process runs everlastingly on
    CPU0, and CPU1 waiting the ksoftirqd/2's termination hangs up.  To fix this
    problem, set the priority of ksoftirqd/2 to max one before kthread_stop().
    [EMAIL PROTECTED]: fix warning]
    Signed-off-by: Satoru Takeuchi <[EMAIL PROTECTED]>
    Cc: Rusty Russell <[EMAIL PROTECTED]>
    Cc: Ingo Molnar <[EMAIL PROTECTED]>
    Cc: Oleg Nesterov <[EMAIL PROTECTED]>
    Cc: Ashok Raj <[EMAIL PROTECTED]>
    Cc: Gautham R Shenoy <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 kernel/softirq.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/kernel/softirq.c b/kernel/softirq.c
index 73217a9..8de2677 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -614,12 +614,16 @@ static int __cpuinit cpu_callback(struct notifier_block 
                kthread_bind(per_cpu(ksoftirqd, hotcpu),
        case CPU_DEAD:
-       case CPU_DEAD_FROZEN:
+       case CPU_DEAD_FROZEN: {
+               struct sched_param param = { .sched_priority = MAX_RT_PRIO-1 };
                p = per_cpu(ksoftirqd, hotcpu);
                per_cpu(ksoftirqd, hotcpu) = NULL;
+               sched_setscheduler(p, SCHED_FIFO, &param);
+       }
 #endif /* CONFIG_HOTPLUG_CPU */
        return NOTIFY_OK;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to