• Nick Piggin's avatar
    [PATCH] sched: integrate cpu hotplug and sched domains · 5927637c
    Nick Piggin authored
    Register a cpu hotplug notifier which reinitializes the scheduler domains
    hierarchy.  The notifier temporarily attaches all running cpus to a "dummy"
    domain (like we currently do during boot) to avoid balancing.  It then calls
    arch_init_sched_domains which rebuilds the "real" domains and reattaches the
    cpus to them.
    
    Also change __init attributes to __devinit where necessary.
    Signed-off-by: default avatarNathan Lynch <nathanl@austin.ibm.com>
    
    Alterations from Nick Piggin:
    
    * Detach all domains in CPU_UP|DOWN_PREPARE notifiers. Reinitialise and
      reattach in CPU_ONLINE|DEAD|UP_CANCELED. This ensures the domains as
      seen from the scheduler won't become out of synch with the cpu_online_map.
    
    * This allows us to remove runtime cpu_online verifications. Do that.
    
    * Dummy domains are __devinitdata.
    
    * Remove the hackery in arch_init_sched_domains to work around the fact that
      the domains used to work with cpu_possible maps, but node_to_cpumask returned
      a cpu_online map.
    Signed-off-by: default avatarNick Piggin <nickpiggin@yahoo.com.au>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    5927637c
sched.c 119 KB