lkml.org 
[lkml]   [2004]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: 2.6.8.1-mm2

    * Rusty Russell <rusty@rustcorp.com.au> wrote:

    > Nathan, can you revert that, and apply this? This actually fixes the
    > might_sleep problem, and should fix at least the problem Vatsa saw.
    > If it doesn't solve your problem, we need to look again.

    i've attached a much simpler replacement: dont allow CPU hotplug during
    self-reap.

    Ingo

    DESC

    disable preemption in the self-reap codepath, as such tasks may not be
    on the tasklist anymore and CPU-hotplug relies on the tasklist to
    migrate tasks.

    Signed-off-by: Ingo Molnar <mingo@elte.hu>

    --- linux/kernel/exit.c.orig
    +++ linux/kernel/exit.c
    @@ -25,6 +25,7 @@
    #include <linux/proc_fs.h>
    #include <linux/mempolicy.h>
    #include <linux/perfctr.h>
    +#include <linux/cpu.h>

    #include <asm/uaccess.h>
    #include <asm/unistd.h>
    @@ -780,8 +781,14 @@ static void exit_notify(struct task_stru

    /* If the process is dead, release it - nobody will wait for it */
    if (state == TASK_DEAD) {
    + lock_cpu_hotplug();
    release_task(tsk);
    write_lock_irq(&tasklist_lock);
    + /*
    + * No preemption may happen from this point on,
    + * or CPU hotplug (and task exit) breaks:
    + */
    + unlock_cpu_hotplug();
    tsk->state = state;
    _raw_write_unlock(&tasklist_lock);
    local_irq_enable();
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2005-03-22 14:05    [W:0.023 / U:89.920 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site