Advertisement
Guest User

Untitled

a guest
Oct 21st, 2015
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.24 KB | None | 0 0
  1. diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
  2. index 8648438..8ee16f3 100644
  3. --- a/arch/x86/xen/smp.c
  4. +++ b/arch/x86/xen/smp.c
  5. @@ -55,6 +55,31 @@ static irqreturn_t xen_call_function_interrupt(int irq, void *dev_id);
  6.  static irqreturn_t xen_call_function_single_interrupt(int irq, void *dev_id);
  7.  static irqreturn_t xen_irq_work_interrupt(int irq, void *dev_id);
  8.  
  9. +const struct cpumask *xen_pcpu_sched_domain_mask(int cpu)
  10. +{
  11. +   return cpu_online_mask;
  12. +}
  13. +
  14. +static inline int xen_pcpu_flags(void)
  15. +{
  16. +   return SD_SHARE_CPUCAPACITY | SD_SHARE_PKG_RESOURCES;
  17. +}
  18. +
  19. +static struct sched_domain_topology_level xen_sched_domain_topology[] = {
  20. +        { xen_pcpu_sched_domain_mask, SD_INIT_NAME(PCPU) },
  21. +        { NULL, },
  22. +};
  23. +
  24. +static void xen_set_sched_topology(void)
  25. +{
  26. +        set_sched_topology(xen_sched_domain_topology);
  27. +}
  28. +
  29. +//6025 unsigned long __weak arch_scale_cpu_capacity(struct sched_domain *sd, int cpu)
  30. +//6026 {
  31. +//6027         return default_scale_cpu_capacity(sd, cpu);
  32. +//6028 }
  33. +
  34.  /*
  35.   * Reschedule call back.
  36.   */
  37. @@ -335,6 +360,8 @@ static void __init xen_smp_prepare_cpus(unsigned int max_cpus)
  38.     }
  39.     set_cpu_sibling_map(0);
  40.  
  41. +   xen_set_sched_topology();
  42. +
  43.     if (xen_smp_intr_init(0))
  44.         BUG();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement