1. 09 12月, 2009 13 次提交
  2. 07 12月, 2009 2 次提交
    • P
      sched: Fix balance vs hotplug race · 6ad4c188
      Peter Zijlstra 提交于
      Since (e761b772: cpu hotplug, sched: Introduce cpu_active_map and redo
      sched domain managment) we have cpu_active_mask which is suppose to rule
      scheduler migration and load-balancing, except it never (fully) did.
      
      The particular problem being solved here is a crash in try_to_wake_up()
      where select_task_rq() ends up selecting an offline cpu because
      select_task_rq_fair() trusts the sched_domain tree to reflect the
      current state of affairs, similarly select_task_rq_rt() trusts the
      root_domain.
      
      However, the sched_domains are updated from CPU_DEAD, which is after the
      cpu is taken offline and after stop_machine is done. Therefore it can
      race perfectly well with code assuming the domains are right.
      
      Cure this by building the domains from cpu_active_mask on
      CPU_DOWN_PREPARE.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      6ad4c188
    • G
      cpumask: Fix generate_sched_domains() for UP · e1b8090b
      Geert Uytterhoeven 提交于
      Commit acc3f5d7 ("cpumask:
      Partition_sched_domains takes array of cpumask_var_t") changed
      the function signature of generate_sched_domains() for the
      CONFIG_SMP=y case, but forgot to update the corresponding
      function for the CONFIG_SMP=n case, causing:
      
        kernel/cpuset.c:2073: warning: passing argument 1 of 'generate_sched_domains' from incompatible pointer type
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <alpine.DEB.2.00.0912062038070.5693@ayla.of.borg>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e1b8090b
  3. 06 12月, 2009 25 次提交