Merge commit 'v2.6.28' into core/core
Ingo Molnar [Thu, 25 Dec 2008 12:51:46 +0000 (13:51 +0100)]
1  2 
kernel/posix-cpu-timers.c
kernel/sched.c
kernel/softlockup.c

@@@ -58,21 -58,21 +58,21 @@@ void thread_group_cputime
        struct task_struct *tsk,
        struct task_cputime *times)
  {
 -      struct signal_struct *sig;
 +      struct task_cputime *totals, *tot;
        int i;
 -      struct task_cputime *tot;
  
 -      sig = tsk->signal;
 -      if (unlikely(!sig) || !sig->cputime.totals) {
 +      totals = tsk->signal->cputime.totals;
 +      if (!totals) {
                times->utime = tsk->utime;
                times->stime = tsk->stime;
                times->sum_exec_runtime = tsk->se.sum_exec_runtime;
                return;
        }
 +
        times->stime = times->utime = cputime_zero;
        times->sum_exec_runtime = 0;
        for_each_possible_cpu(i) {
 -              tot = per_cpu_ptr(tsk->signal->cputime.totals, i);
 +              tot = per_cpu_ptr(totals, i);
                times->utime = cputime_add(times->utime, tot->utime);
                times->stime = cputime_add(times->stime, tot->stime);
                times->sum_exec_runtime += tot->sum_exec_runtime;
@@@ -311,7 -311,7 +311,7 @@@ static int cpu_clock_sample_group(cons
        struct task_cputime cputime;
  
        thread_group_cputime(p, &cputime);
-       switch (which_clock) {
+       switch (CPUCLOCK_WHICH(which_clock)) {
        default:
                return -EINVAL;
        case CPUCLOCK_PROF:
diff --combined kernel/sched.c
@@@ -1453,9 -1453,10 +1453,10 @@@ static int task_hot(struct task_struct 
  static unsigned long cpu_avg_load_per_task(int cpu)
  {
        struct rq *rq = cpu_rq(cpu);
+       unsigned long nr_running = ACCESS_ONCE(rq->nr_running);
  
-       if (rq->nr_running)
-               rq->avg_load_per_task = rq->load.weight / rq->nr_running;
+       if (nr_running)
+               rq->avg_load_per_task = rq->load.weight / nr_running;
        else
                rq->avg_load_per_task = 0;
  
@@@ -4202,6 -4203,7 +4203,6 @@@ void account_steal_time(struct task_str
  
        if (p == rq->idle) {
                p->stime = cputime_add(p->stime, steal);
 -              account_group_system_time(p, steal);
                if (atomic_read(&rq->nr_iowait) > 0)
                        cpustat->iowait = cputime64_add(cpustat->iowait, tmp);
                else
@@@ -4337,7 -4339,7 +4338,7 @@@ void __kprobes sub_preempt_count(int va
        /*
         * Underflow?
         */
 -      if (DEBUG_LOCKS_WARN_ON(val > preempt_count()))
 +       if (DEBUG_LOCKS_WARN_ON(val > preempt_count() - (!!kernel_locked())))
                return;
        /*
         * Is the spinlock portion underflowing?
@@@ -6585,7 -6587,9 +6586,9 @@@ migration_call(struct notifier_block *n
                        req = list_entry(rq->migration_queue.next,
                                         struct migration_req, list);
                        list_del_init(&req->list);
+                       spin_unlock_irq(&rq->lock);
                        complete(&req->done);
+                       spin_lock_irq(&rq->lock);
                }
                spin_unlock_irq(&rq->lock);
                break;
diff --combined kernel/softlockup.c
@@@ -164,7 -164,7 +164,7 @@@ unsigned long __read_mostly sysctl_hung
  /*
   * Zero means infinite timeout - no checking done:
   */
 -unsigned long __read_mostly sysctl_hung_task_timeout_secs = 120;
 +unsigned long __read_mostly sysctl_hung_task_timeout_secs = 480;
  
  unsigned long __read_mostly sysctl_hung_task_warnings = 10;
  
@@@ -188,7 -188,7 +188,7 @@@ static void check_hung_task(struct task
        if ((long)(now - t->last_switch_timestamp) <
                                        sysctl_hung_task_timeout_secs)
                return;
-       if (sysctl_hung_task_warnings < 0)
+       if (!sysctl_hung_task_warnings)
                return;
        sysctl_hung_task_warnings--;