]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Merge branch 'sched/urgent' into sched/core
authorIngo Molnar <mingo@elte.hu>
Fri, 7 Nov 2008 09:29:58 +0000 (10:29 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 7 Nov 2008 09:29:58 +0000 (10:29 +0100)
1  2 
arch/x86/Kconfig
kernel/sched.c

diff --combined arch/x86/Kconfig
index 488a4ecd0b590e99205fa7482b7fcaa3da4011f0,4cf0ab13d187a943f88afc1d9761c739fee41008..1d5550d19b663f2fc163ddc9a363222ae18ed90f
@@@ -367,7 -367,7 +367,7 @@@ config X86_RDC321
  config SCHED_NO_NO_OMIT_FRAME_POINTER
        def_bool y
        prompt "Single-depth WCHAN output"
 -      depends on X86_32
 +      depends on X86
        help
          Calculate simpler /proc/<PID>/wchan values. If this option
          is disabled then wchan values will recurse back to the
@@@ -1494,7 -1494,7 +1494,7 @@@ config HAVE_ARCH_EARLY_PFN_TO_NI
        def_bool X86_64
        depends on NUMA
  
- menu "Power management options"
+ menu "Power management and ACPI options"
        depends on !X86_VOYAGER
  
  config ARCH_HIBERNATION_HEADER
@@@ -1894,6 -1894,10 +1894,10 @@@ config SYSVIPC_COMPA
  endmenu
  
  
+ config HAVE_ATOMIC_IOMAP
+       def_bool y
+       depends on X86_32
  source "net/Kconfig"
  
  source "drivers/Kconfig"
diff --combined kernel/sched.c
index 213cad5e50aa48e62e94964f202e3fd4d2616420,57c933ffbee1aab4794c30f3690b8188e4ddf02a..b24e57a10f6fb173b1e5d570ba4f922ed13f4989
@@@ -397,7 -397,7 +397,7 @@@ struct cfs_rq 
         * 'curr' points to currently running entity on this cfs_rq.
         * It is set to NULL otherwise (i.e when none are currently running).
         */
-       struct sched_entity *curr, *next;
+       struct sched_entity *curr, *next, *last;
  
        unsigned long nr_spread_over;
  
@@@ -703,18 -703,45 +703,18 @@@ static __read_mostly char *sched_feat_n
  
  #undef SCHED_FEAT
  
 -static int sched_feat_open(struct inode *inode, struct file *filp)
 -{
 -      filp->private_data = inode->i_private;
 -      return 0;
 -}
 -
 -static ssize_t
 -sched_feat_read(struct file *filp, char __user *ubuf,
 -              size_t cnt, loff_t *ppos)
 +static int sched_feat_show(struct seq_file *m, void *v)
  {
 -      char *buf;
 -      int r = 0;
 -      int len = 0;
        int i;
  
        for (i = 0; sched_feat_names[i]; i++) {
 -              len += strlen(sched_feat_names[i]);
 -              len += 4;
 +              if (!(sysctl_sched_features & (1UL << i)))
 +                      seq_puts(m, "NO_");
 +              seq_printf(m, "%s ", sched_feat_names[i]);
        }
 +      seq_puts(m, "\n");
  
 -      buf = kmalloc(len + 2, GFP_KERNEL);
 -      if (!buf)
 -              return -ENOMEM;
 -
 -      for (i = 0; sched_feat_names[i]; i++) {
 -              if (sysctl_sched_features & (1UL << i))
 -                      r += sprintf(buf + r, "%s ", sched_feat_names[i]);
 -              else
 -                      r += sprintf(buf + r, "NO_%s ", sched_feat_names[i]);
 -      }
 -
 -      r += sprintf(buf + r, "\n");
 -      WARN_ON(r >= len + 2);
 -
 -      r = simple_read_from_buffer(ubuf, cnt, ppos, buf, r);
 -
 -      kfree(buf);
 -
 -      return r;
 +      return 0;
  }
  
  static ssize_t
@@@ -759,17 -786,10 +759,17 @@@ sched_feat_write(struct file *filp, con
        return cnt;
  }
  
 +static int sched_feat_open(struct inode *inode, struct file *filp)
 +{
 +      return single_open(filp, sched_feat_show, NULL);
 +}
 +
  static struct file_operations sched_feat_fops = {
 -      .open   = sched_feat_open,
 -      .read   = sched_feat_read,
 -      .write  = sched_feat_write,
 +      .open           = sched_feat_open,
 +      .write          = sched_feat_write,
 +      .read           = seq_read,
 +      .llseek         = seq_lseek,
 +      .release        = single_release,
  };
  
  static __init int sched_init_debug(void)
@@@ -1785,7 -1805,9 +1785,9 @@@ task_hot(struct task_struct *p, u64 now
        /*
         * Buddy candidates are cache hot:
         */
-       if (sched_feat(CACHE_HOT_BUDDY) && (&p->se == cfs_rq_of(&p->se)->next))
+       if (sched_feat(CACHE_HOT_BUDDY) &&
+                       (&p->se == cfs_rq_of(&p->se)->next ||
+                        &p->se == cfs_rq_of(&p->se)->last))
                return 1;
  
        if (p->sched_class != &fair_sched_class)
@@@ -6602,6 -6624,28 +6604,6 @@@ early_initcall(migration_init)
  
  #ifdef CONFIG_SCHED_DEBUG
  
 -static inline const char *sd_level_to_string(enum sched_domain_level lvl)
 -{
 -      switch (lvl) {
 -      case SD_LV_NONE:
 -                      return "NONE";
 -      case SD_LV_SIBLING:
 -                      return "SIBLING";
 -      case SD_LV_MC:
 -                      return "MC";
 -      case SD_LV_CPU:
 -                      return "CPU";
 -      case SD_LV_NODE:
 -                      return "NODE";
 -      case SD_LV_ALLNODES:
 -                      return "ALLNODES";
 -      case SD_LV_MAX:
 -                      return "MAX";
 -
 -      }
 -      return "MAX";
 -}
 -
  static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
                                  cpumask_t *groupmask)
  {
                return -1;
        }
  
 -      printk(KERN_CONT "span %s level %s\n",
 -              str, sd_level_to_string(sd->level));
 +      printk(KERN_CONT "span %s level %s\n", str, sd->name);
  
        if (!cpu_isset(cpu, sd->span)) {
                printk(KERN_ERR "ERROR: domain->span does not contain "
@@@ -6832,15 -6877,17 +6834,17 @@@ cpu_attach_domain(struct sched_domain *
        struct sched_domain *tmp;
  
        /* Remove the sched domains which do not contribute to scheduling. */
-       for (tmp = sd; tmp; tmp = tmp->parent) {
+       for (tmp = sd; tmp; ) {
                struct sched_domain *parent = tmp->parent;
                if (!parent)
                        break;
                if (sd_parent_degenerate(tmp, parent)) {
                        tmp->parent = parent->parent;
                        if (parent->parent)
                                parent->parent->child = tmp;
-               }
+               } else
+                       tmp = tmp->parent;
        }
  
        if (sd && sd_degenerate(sd)) {
@@@ -7629,6 -7676,7 +7633,7 @@@ static int __build_sched_domains(const 
  error:
        free_sched_groups(cpu_map, tmpmask);
        SCHED_CPUMASK_FREE((void *)allmasks);
+       kfree(rd);
        return -ENOMEM;
  #endif
  }
@@@ -7691,6 -7739,8 +7696,6 @@@ static void detach_destroy_domains(cons
        cpumask_t tmpmask;
        int i;
  
 -      unregister_sched_domain_sysctl();
 -
        for_each_cpu_mask_nr(i, *cpu_map)
                cpu_attach_domain(NULL, &def_root_domain, i);
        synchronize_sched();
@@@ -7767,7 -7817,7 +7772,7 @@@ match1
                ndoms_cur = 0;
                doms_new = &fallback_doms;
                cpus_andnot(doms_new[0], cpu_online_map, cpu_isolated_map);
 -              dattr_new = NULL;
 +              WARN_ON_ONCE(dattr_new);
        }
  
        /* Build new domains */
@@@ -8427,7 -8477,7 +8432,7 @@@ stati
  int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent)
  {
        struct cfs_rq *cfs_rq;
 -      struct sched_entity *se, *parent_se;
 +      struct sched_entity *se;
        struct rq *rq;
        int i;
  
        for_each_possible_cpu(i) {
                rq = cpu_rq(i);
  
 -              cfs_rq = kmalloc_node(sizeof(struct cfs_rq),
 -                              GFP_KERNEL|__GFP_ZERO, cpu_to_node(i));
 +              cfs_rq = kzalloc_node(sizeof(struct cfs_rq),
 +                                    GFP_KERNEL, cpu_to_node(i));
                if (!cfs_rq)
                        goto err;
  
 -              se = kmalloc_node(sizeof(struct sched_entity),
 -                              GFP_KERNEL|__GFP_ZERO, cpu_to_node(i));
 +              se = kzalloc_node(sizeof(struct sched_entity),
 +                                GFP_KERNEL, cpu_to_node(i));
                if (!se)
                        goto err;
  
 -              parent_se = parent ? parent->se[i] : NULL;
 -              init_tg_cfs_entry(tg, cfs_rq, se, i, 0, parent_se);
 +              init_tg_cfs_entry(tg, cfs_rq, se, i, 0, parent->se[i]);
        }
  
        return 1;
@@@ -8514,7 -8565,7 +8519,7 @@@ stati
  int alloc_rt_sched_group(struct task_group *tg, struct task_group *parent)
  {
        struct rt_rq *rt_rq;
 -      struct sched_rt_entity *rt_se, *parent_se;
 +      struct sched_rt_entity *rt_se;
        struct rq *rq;
        int i;
  
        for_each_possible_cpu(i) {
                rq = cpu_rq(i);
  
 -              rt_rq = kmalloc_node(sizeof(struct rt_rq),
 -                              GFP_KERNEL|__GFP_ZERO, cpu_to_node(i));
 +              rt_rq = kzalloc_node(sizeof(struct rt_rq),
 +                                   GFP_KERNEL, cpu_to_node(i));
                if (!rt_rq)
                        goto err;
  
 -              rt_se = kmalloc_node(sizeof(struct sched_rt_entity),
 -                              GFP_KERNEL|__GFP_ZERO, cpu_to_node(i));
 +              rt_se = kzalloc_node(sizeof(struct sched_rt_entity),
 +                                   GFP_KERNEL, cpu_to_node(i));
                if (!rt_se)
                        goto err;
  
 -              parent_se = parent ? parent->rt_se[i] : NULL;
 -              init_tg_rt_entry(tg, rt_rq, rt_se, i, 0, parent_se);
 +              init_tg_rt_entry(tg, rt_rq, rt_se, i, 0, parent->rt_se[i]);
        }
  
        return 1;