]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Merge branch 'sched/urgent' into sched/core
authorIngo Molnar <mingo@kernel.org>
Mon, 13 Jan 2014 12:35:28 +0000 (13:35 +0100)
committerIngo Molnar <mingo@kernel.org>
Mon, 13 Jan 2014 12:35:28 +0000 (13:35 +0100)
Pick up the latest fixes before applying new changes.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
1  2 
kernel/fork.c
kernel/sched/fair.c

diff --combined kernel/fork.c
index b3080823a24d08d875da78af3f05b8d6cd72456a,5721f0e3f2da4d1d4bcbc788b4016c944bbfea03..6023d150a3052cf5ed832b66fb81939bb9c1aa21
@@@ -537,6 -537,7 +537,7 @@@ static struct mm_struct *mm_init(struc
        spin_lock_init(&mm->page_table_lock);
        mm_init_aio(mm);
        mm_init_owner(mm, p);
+       clear_tlb_flush_pending(mm);
  
        if (likely(!mm_alloc_pgd(mm))) {
                mm->def_flags = 0;
@@@ -1402,11 -1403,13 +1403,11 @@@ static struct task_struct *copy_process
                p->tgid = p->pid;
        }
  
 -      p->pdeath_signal = 0;
 -      p->exit_state = 0;
 -
        p->nr_dirtied = 0;
        p->nr_dirtied_pause = 128 >> (PAGE_SHIFT - 10);
        p->dirty_paused_when = 0;
  
 +      p->pdeath_signal = 0;
        INIT_LIST_HEAD(&p->thread_group);
        p->task_works = NULL;
  
diff --combined kernel/sched/fair.c
index 4316af287f605c487f358df666c7e7d8a345de51,e64b0794060e6d89a7d3e216efe8189fffdbb8d7..b73f4ba62b2466d3f3363f293a25152bd335227c
@@@ -872,6 -872,15 +872,6 @@@ static unsigned int task_scan_max(struc
        return max(smin, smax);
  }
  
 -/*
 - * Once a preferred node is selected the scheduler balancer will prefer moving
 - * a task to that node for sysctl_numa_balancing_settle_count number of PTE
 - * scans. This will give the process the chance to accumulate more faults on
 - * the preferred node but still allow the scheduler to move the task again if
 - * the nodes CPUs are overloaded.
 - */
 -unsigned int sysctl_numa_balancing_settle_count __read_mostly = 4;
 -
  static void account_numa_enqueue(struct rq *rq, struct task_struct *p)
  {
        rq->nr_numa_running += (p->numa_preferred_nid != -1);
@@@ -921,8 -930,7 +921,8 @@@ static inline unsigned long group_fault
        if (!p->numa_group)
                return 0;
  
 -      return p->numa_group->faults[2*nid] + p->numa_group->faults[2*nid+1];
 +      return p->numa_group->faults[task_faults_idx(nid, 0)] +
 +              p->numa_group->faults[task_faults_idx(nid, 1)];
  }
  
  /*
@@@ -1015,7 -1023,7 +1015,7 @@@ struct task_numa_env 
  
        struct numa_stats src_stats, dst_stats;
  
 -      int imbalance_pct, idx;
 +      int imbalance_pct;
  
        struct task_struct *best_task;
        long best_imp;
@@@ -1203,7 -1211,7 +1203,7 @@@ static int task_numa_migrate(struct tas
         * elsewhere, so there is no point in (re)trying.
         */
        if (unlikely(!sd)) {
 -              p->numa_preferred_nid = cpu_to_node(task_cpu(p));
 +              p->numa_preferred_nid = task_node(p);
                return -EINVAL;
        }
  
@@@ -1270,7 -1278,7 +1270,7 @@@ static void numa_migrate_preferred(stru
        p->numa_migrate_retry = jiffies + HZ;
  
        /* Success if task is already running on preferred CPU */
 -      if (cpu_to_node(task_cpu(p)) == p->numa_preferred_nid)
 +      if (task_node(p) == p->numa_preferred_nid)
                return;
  
        /* Otherwise, try migrate to a CPU on the preferred node */
@@@ -1342,6 -1350,7 +1342,6 @@@ static void update_task_scan_period(str
                 * scanning faster if shared accesses dominate as it may
                 * simply bounce migrations uselessly
                 */
 -              period_slot = DIV_ROUND_UP(diff, NUMA_PERIOD_SLOTS);
                ratio = DIV_ROUND_UP(private * NUMA_PERIOD_SLOTS, (private + shared));
                diff = (diff * ratio) / NUMA_PERIOD_SLOTS;
        }
@@@ -1729,6 -1738,13 +1729,13 @@@ void task_numa_work(struct callback_hea
                    (vma->vm_file && (vma->vm_flags & (VM_READ|VM_WRITE)) == (VM_READ)))
                        continue;
  
+               /*
+                * Skip inaccessible VMAs to avoid any confusion between
+                * PROT_NONE and NUMA hinting ptes
+                */
+               if (!(vma->vm_flags & (VM_READ | VM_EXEC | VM_WRITE)))
+                       continue;
                do {
                        start = max(start, vma->vm_start);
                        end = ALIGN(start + (pages << PAGE_SHIFT), HPAGE_SIZE);
@@@ -3907,7 -3923,7 +3914,7 @@@ static long effective_load(struct task_
  {
        struct sched_entity *se = tg->se[cpu];
  
-       if (!tg->parent || !wl) /* the trivial, non-cgroup case */
+       if (!tg->parent)        /* the trivial, non-cgroup case */
                return wl;
  
        for_each_sched_entity(se) {
@@@ -4085,16 -4101,12 +4092,16 @@@ static int wake_affine(struct sched_dom
   */
  static struct sched_group *
  find_idlest_group(struct sched_domain *sd, struct task_struct *p,
 -                int this_cpu, int load_idx)
 +                int this_cpu, int sd_flag)
  {
        struct sched_group *idlest = NULL, *group = sd->groups;
        unsigned long min_load = ULONG_MAX, this_load = 0;
 +      int load_idx = sd->forkexec_idx;
        int imbalance = 100 + (sd->imbalance_pct-100)/2;
  
 +      if (sd_flag & SD_BALANCE_WAKE)
 +              load_idx = sd->wake_idx;
 +
        do {
                unsigned long load, avg_load;
                int local_group;
@@@ -4262,6 -4274,7 +4269,6 @@@ select_task_rq_fair(struct task_struct 
        }
  
        while (sd) {
 -              int load_idx = sd->forkexec_idx;
                struct sched_group *group;
                int weight;
  
                        continue;
                }
  
 -              if (sd_flag & SD_BALANCE_WAKE)
 -                      load_idx = sd->wake_idx;
 -
 -              group = find_idlest_group(sd, p, cpu, load_idx);
 +              group = find_idlest_group(sd, p, cpu, sd_flag);
                if (!group) {
                        sd = sd->child;
                        continue;
@@@ -5496,6 -5512,7 +5503,6 @@@ static inline void update_sg_lb_stats(s
                        struct sched_group *group, int load_idx,
                        int local_group, struct sg_lb_stats *sgs)
  {
 -      unsigned long nr_running;
        unsigned long load;
        int i;
  
        for_each_cpu_and(i, sched_group_cpus(group), env->cpus) {
                struct rq *rq = cpu_rq(i);
  
 -              nr_running = rq->nr_running;
 -
                /* Bias balancing toward cpus of our domain */
                if (local_group)
                        load = target_load(i, load_idx);
                        load = source_load(i, load_idx);
  
                sgs->group_load += load;
 -              sgs->sum_nr_running += nr_running;
 +              sgs->sum_nr_running += rq->nr_running;
  #ifdef CONFIG_NUMA_BALANCING
                sgs->nr_numa_running += rq->nr_numa_running;
                sgs->nr_preferred_running += rq->nr_preferred_running;