@@ -847,7 +847,8 @@ uint64_t get_cpu_idle_time(unsigned int cpu);
/*
* Used by idle loop to decide whether there is work to do:
- * (1) Run softirqs; or (2) Play dead; or (3) Run tasklets.
+ * (1) Deal with RCU; (2) or run softirqs; or (3) Play dead;
+ * or (4) Run tasklets.
*
* About (3), if a tasklet is enqueued, it will be scheduled
* really really soon, and hence it's pointless to try to
@@ -855,7 +856,8 @@ uint64_t get_cpu_idle_time(unsigned int cpu);
* the tasklet_work_to_do() helper).
*/
#define cpu_is_haltable(cpu) \
- (!softirq_pending(cpu) && \
+ (!rcu_needs_cpu(cpu) && \
+ !softirq_pending(cpu) && \
cpu_online(cpu) && \
!per_cpu(tasklet_work_to_do, cpu))