Merge branch 'sched/urgent' into sched/core
authorIngo Molnar <mingo@kernel.org>
Fri, 30 Jan 2015 18:28:36 +0000 (19:28 +0100)
committerIngo Molnar <mingo@kernel.org>
Fri, 30 Jan 2015 18:28:36 +0000 (19:28 +0100)
Merge all pending fixes and refresh the tree, before applying new changes.

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

diff --combined kernel/sched/core.c
index b53cc859fc4ffd73defcfc05aa5352e6c8f7f909,5c86687d22b39bd74c386523cf4b74e3978bfbfe..0b591fe67b70b894ac1373f951ceabe8dddcfc1b
@@@ -119,9 -119,7 +119,9 @@@ void update_rq_clock(struct rq *rq
  {
        s64 delta;
  
 -      if (rq->skip_clock_update > 0)
 +      lockdep_assert_held(&rq->lock);
 +
 +      if (rq->clock_skip_update & RQCF_ACT_SKIP)
                return;
  
        delta = sched_clock_cpu(cpu_of(rq)) - rq->clock;
@@@ -1048,7 -1046,7 +1048,7 @@@ void check_preempt_curr(struct rq *rq, 
         * this case, we can save a useless back to back clock update.
         */
        if (task_on_rq_queued(rq->curr) && test_tsk_need_resched(rq->curr))
 -              rq->skip_clock_update = 1;
 +              rq_clock_skip_update(rq, true);
  }
  
  #ifdef CONFIG_SMP
@@@ -1834,9 -1832,6 +1834,9 @@@ static void __sched_fork(unsigned long 
        p->se.prev_sum_exec_runtime     = 0;
        p->se.nr_migrations             = 0;
        p->se.vruntime                  = 0;
 +#ifdef CONFIG_SMP
 +      p->se.avg.decay_count           = 0;
 +#endif
        INIT_LIST_HEAD(&p->se.group_node);
  
  #ifdef CONFIG_SCHEDSTATS
@@@ -2781,8 -2776,6 +2781,8 @@@ need_resched
        smp_mb__before_spinlock();
        raw_spin_lock_irq(&rq->lock);
  
 +      rq->clock_skip_update <<= 1; /* promote REQ to ACT */
 +
        switch_count = &prev->nivcsw;
        if (prev->state && !(preempt_count() & PREEMPT_ACTIVE)) {
                if (unlikely(signal_pending_state(prev->state, prev))) {
                switch_count = &prev->nvcsw;
        }
  
 -      if (task_on_rq_queued(prev) || rq->skip_clock_update < 0)
 +      if (task_on_rq_queued(prev))
                update_rq_clock(rq);
  
        next = pick_next_task(rq, prev);
        clear_tsk_need_resched(prev);
        clear_preempt_need_resched();
 -      rq->skip_clock_update = 0;
 +      rq->clock_skip_update = 0;
  
        if (likely(prev != next)) {
                rq->nr_switches++;
@@@ -4515,10 -4508,9 +4515,10 @@@ void sched_show_task(struct task_struc
  {
        unsigned long free = 0;
        int ppid;
 -      unsigned state;
 +      unsigned long state = p->state;
  
 -      state = p->state ? __ffs(p->state) + 1 : 0;
 +      if (state)
 +              state = __ffs(state) + 1;
        printk(KERN_INFO "%-15.15s %c", p->comm,
                state < sizeof(stat_nam) - 1 ? stat_nam[state] : '?');
  #if BITS_PER_LONG == 32
@@@ -4650,6 -4642,9 +4650,9 @@@ int cpuset_cpumask_can_shrink(const str
        struct dl_bw *cur_dl_b;
        unsigned long flags;
  
+       if (!cpumask_weight(cur))
+               return ret;
        rcu_read_lock_sched();
        cur_dl_b = dl_bw_of(cpumask_any(cur));
        trial_cpus = cpumask_weight(trial);
@@@ -4748,7 -4743,7 +4751,7 @@@ static struct rq *move_queued_task(stru
  
  void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)
  {
 -      if (p->sched_class && p->sched_class->set_cpus_allowed)
 +      if (p->sched_class->set_cpus_allowed)
                p->sched_class->set_cpus_allowed(p, new_mask);
  
        cpumask_copy(&p->cpus_allowed, new_mask);
@@@ -7257,11 -7252,6 +7260,11 @@@ void __init sched_init(void
        atomic_inc(&init_mm.mm_count);
        enter_lazy_tlb(&init_mm, current);
  
 +      /*
 +       * During early bootup we pretend to be a normal task:
 +       */
 +      current->sched_class = &fair_sched_class;
 +
        /*
         * Make us the idle thread. Technically, schedule() should not be
         * called from this thread, however somewhere below it might be,
  
        calc_load_update = jiffies + LOAD_FREQ;
  
 -      /*
 -       * During early bootup we pretend to be a normal task:
 -       */
 -      current->sched_class = &fair_sched_class;
 -
  #ifdef CONFIG_SMP
        zalloc_cpumask_var(&sched_domains_tmpmask, GFP_NOWAIT);
        /* May be allocated at isolcpus cmdline parse time */
@@@ -7333,9 -7328,6 +7336,9 @@@ void ___might_sleep(const char *file, i
                        in_atomic(), irqs_disabled(),
                        current->pid, current->comm);
  
 +      if (task_stack_end_corrupted(current))
 +              printk(KERN_EMERG "Thread overran stack, or stack corrupted\n");
 +
        debug_show_held_locks(current);
        if (irqs_disabled())
                print_irqtrace_events(current);
diff --combined kernel/sched/fair.c
index 2ecf779829f56878648bde19fcd207eeabb39a13,fe331fc391f53382f4999c0cd0f13367a827b3cc..7ce18f3c097ac4779eb4cf6ed0ad14ac1beb3eb5
@@@ -676,6 -676,7 +676,6 @@@ void init_task_runnable_average(struct 
  {
        u32 slice;
  
 -      p->se.avg.decay_count = 0;
        slice = sched_slice(task_cfs_rq(p), &p->se) >> 10;
        p->se.avg.runnable_avg_sum = slice;
        p->se.avg.runnable_avg_period = slice;
@@@ -1729,7 -1730,7 +1729,7 @@@ static int preferred_group_nid(struct t
        nodes = node_online_map;
        for (dist = sched_max_numa_distance; dist > LOCAL_DISTANCE; dist--) {
                unsigned long max_faults = 0;
-               nodemask_t max_group;
+               nodemask_t max_group = NODE_MASK_NONE;
                int a, b;
  
                /* Are there nodes at this distance from each other? */
@@@ -2573,11 -2574,11 +2573,11 @@@ static inline u64 __synchronize_entity_
        u64 decays = atomic64_read(&cfs_rq->decay_counter);
  
        decays -= se->avg.decay_count;
 +      se->avg.decay_count = 0;
        if (!decays)
                return 0;
  
        se->avg.load_avg_contrib = decay_load(se->avg.load_avg_contrib, decays);
 -      se->avg.decay_count = 0;
  
        return decays;
  }
@@@ -5156,7 -5157,7 +5156,7 @@@ static void yield_task_fair(struct rq *
                 * so we don't do microscopic update in schedule()
                 * and double the fastpath cost.
                 */
 -               rq->skip_clock_update = 1;
 +              rq_clock_skip_update(rq, true);
        }
  
        set_skip_buddy(se);
@@@ -5948,8 -5949,8 +5948,8 @@@ static unsigned long scale_rt_capacity(
         */
        age_stamp = ACCESS_ONCE(rq->age_stamp);
        avg = ACCESS_ONCE(rq->rt_avg);
 +      delta = __rq_clock_broken(rq) - age_stamp;
  
 -      delta = rq_clock(rq) - age_stamp;
        if (unlikely(delta < 0))
                delta = 0;
  
This page took 0.079405 seconds and 5 git commands to generate.