[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 03:32:12PM +1000, Rusty Russell wrote:
    > But other tasks can do a getaffinity() on it and see the wrong affinity.
    > Probably not a big issue.

    hmm .. the fact that getaffinity reads the cpus_allowed mask w/o doing
    lock_cpu_hotplug makes it already racy wrt setaffinity?

    Maybe it needs to take CPU hotplug sem before it reads the mask?

    > I agree with Ingo: it's clever, well done. Minor nitpicks:
    > +void migrate_all_tasks(int cpu)
    > {
    > struct task_struct *tsk, *t;
    > int dest_cpu, src_cpu;
    > unsigned int node;
    > - /* We're nailed to this CPU. */
    > - src_cpu = smp_processor_id();
    > + src_cpu = cpu;
    > Just make the parameter name "src_cpu"?


    > This comment's very big. They don't need to know all the things we
    > don't do. I'd prefer:
    > /* Force idle task to run as soon as we yield: it should
    > immediately notice cpu is offline and die quickly. */

    Sure, I will change as per your comments.

    I would like to run my stress tests for longer time before I send it
    for inclusion (i would be on vacation till next tuesday maybe i will send
    in the patch after that!)


    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:0.047 / U:6.456 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site