[lkml]   [2004]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [Experimental CPU Hotplug PATCH] - Move migrate_all_tasks to CPU_DEAD handling
    On Wed, Apr 07, 2004 at 01:54:34PM +1000, Rusty Russell wrote:
    > No, it really is required.
    > The stop_machine thread runs on the cpu, then kicks everyone else off,
    > then does a complete() (in stop_machine.c:do_stop()). Without this
    > check, the complete() drags the sleeping process (which called
    > stop_machine) onto the dying CPU.

    Precisely. That's why I ended up adding this in cpu_down!!

    + /* Ensure that we are not runnable on dying cpu */
    + old_allowed = current->cpus_allowed;
    + tmp = CPU_MASK_ALL;
    + cpu_clear(cpu, tmp);
    + set_cpus_allowed(current, tmp);

    I restore the mask though (under covers of lock_cpu_hotplug) before
    returning from cpu_down. Task should never see this violated affinity.

    What do you think abt the whole patch? It has withstood
    my stress-test harness :-)


    Thanks and Regards,
    Srivatsa Vaddagiri,
    Linux Technology Center,
    IBM Software Labs,
    Bangalore, INDIA - 560017
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:02    [W:4.590 / U:5.072 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site