• Rusty Russell's avatar
    [PATCH] wait_task_inactive should not return on preempt · 3da04c35
    Rusty Russell authored
    wait_task_inactive is now only used in two non-time-critical places: the
    ptrace code to guarantee a schedule and kthread_bind so we can change
    the thread CPU.  Unfortunately with preempt, the code as stands has a
    race: we might return because the thread is preempted, not because it
    actually reached schedule().  The ptrace code (probably) doesn't care,
    but the kthread code does.
    
    This patch simplifies the (now over-optimized) code, and does a yield()
    for the preemption case.
    3da04c35
sched.c 73.1 KB