lkml.org 
[lkml]   [2011]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 4/5] sched: Switch wait_task_inactive to schedule_hrtimeout()
    When we force thread hard and soft interrupts the startup of ksoftirqd
    would hang in kthread_bind() when wait_task_inactive() calls
    schedule_timeout_uninterruptible() because there is no softirq yet
    which will wake us up.

    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    ---
    kernel/sched.c | 5 ++++-
    1 file changed, 4 insertions(+), 1 deletion(-)

    Index: linux-2.6-tip/kernel/sched.c
    ===================================================================
    --- linux-2.6-tip.orig/kernel/sched.c
    +++ linux-2.6-tip/kernel/sched.c
    @@ -2224,7 +2224,10 @@ unsigned long wait_task_inactive(struct
    * yield - it could be a while.
    */
    if (unlikely(on_rq)) {
    - schedule_timeout_uninterruptible(1);
    + ktime_t to = ktime_set(0, NSEC_PER_SEC/HZ);
    +
    + set_current_state(TASK_UNINTERRUPTIBLE);
    + schedule_hrtimeout(&to, HRTIMER_MODE_REL);
    continue;
    }




    \
     
     \ /
      Last update: 2011-02-24 00:55    [W:0.022 / U:0.784 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site