Merge branch 'linus' into core/rcu
authorIngo Molnar <mingo@elte.hu>
Mon, 1 Mar 2010 08:28:53 +0000 (09:28 +0100)
committerIngo Molnar <mingo@elte.hu>
Mon, 1 Mar 2010 08:28:58 +0000 (09:28 +0100)
Merge reason: Backmerge latest upstream to queue up dependent fix in the
              scheduler.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/cgroup.h
kernel/rcutree_plugin.h

index c9bbcb2a75aecbacdb1463cf08a2b0a26d0f264b..a73e1ced09b863d675aa2cfca6e4540d4f471a2f 100644 (file)
@@ -489,6 +489,7 @@ static inline struct cgroup_subsys_state *task_subsys_state(
 {
        return rcu_dereference_check(task->cgroups->subsys[subsys_id],
                                     rcu_read_lock_held() ||
+                                    !rcu_scheduler_active ||
                                     cgroup_lock_is_held());
 }
 
index 464ad2cdee00a22bfbfe258853770f3bb60e3f5d..79b53bda894326838c200575c7f87e0b5f70b678 100644 (file)
@@ -1010,6 +1010,10 @@ int rcu_needs_cpu(int cpu)
        int c = 0;
        int thatcpu;
 
+       /* Check for being in the holdoff period. */
+       if (per_cpu(rcu_dyntick_holdoff, cpu) == jiffies)
+               return rcu_needs_cpu_quick_check(cpu);
+
        /* Don't bother unless we are the last non-dyntick-idle CPU. */
        for_each_cpu_not(thatcpu, nohz_cpu_mask)
                if (thatcpu != cpu) {
@@ -1041,10 +1045,8 @@ int rcu_needs_cpu(int cpu)
        }
 
        /* If RCU callbacks are still pending, RCU still needs this CPU. */
-       if (c) {
+       if (c)
                raise_softirq(RCU_SOFTIRQ);
-               per_cpu(rcu_dyntick_holdoff, cpu) = jiffies;
-       }
        return c;
 }