lkml.org 
[lkml]   [2004]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] 2.6.2-rc2-mm2 CPU Hotplug: The Core

On Sun, 1 Feb 2004, Rusty Russell wrote:

> D: - kernel/sched.c: Add wake_idle_cpu() for i386 hotplug.
> D:
> D: Check everywhere to make sure we never move tasks onto an
> D: offline cpu: we'll just be fighting migrate_all_tasks().
> D:
> D: Change sched_migrate_task() to migrate_to_cpu and expose it
> D: for hotplug cpu.
> D:
> D: Take hotplug lock in sys_sched_setaffinity.
> D:
> D: Return cpus_allowed masked by cpu_possible_map, not
> D: cpu_online_map in sys_sched_getaffinity, otherwise tasks can't
> D: know about whether they can run on currently-offline cpus.
> D:
> D: Implement migrate_all_tasks() to push tasks off the dying cpu.
> D:
> D: Add callbacks to stop migration thread.

the sched.c bits look good. A question: why is the migrate_all_tasks()
code nonatomic? If you run this code in the context of the migration
thread of the downed CPU then all of the migration can be done in one big
atomic locked section which holds all runqueue locks and just moves all
tasks off the current CPU. If it were done this way then eg. the
__migrate_task() race-avoidance check (cpu_is_offline()) could go away and
the whole thing would be more robust i believe.

Ingo
-
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:00    [W:0.091 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site