|
@@ -111,6 +111,7 @@ static int qhimark = 10000; /* If this many pending, ignore blimit. */
|
|
|
static int qlowmark = 100; /* Once only this many pending, use blimit. */
|
|
|
|
|
|
static void force_quiescent_state(struct rcu_state *rsp, int relaxed);
|
|
|
+static int rcu_pending(int cpu);
|
|
|
|
|
|
/*
|
|
|
* Return the number of RCU-sched batches processed thus far for debug & stats.
|
|
@@ -974,6 +975,8 @@ static void rcu_do_batch(struct rcu_data *rdp)
|
|
|
*/
|
|
|
void rcu_check_callbacks(int cpu, int user)
|
|
|
{
|
|
|
+ if (!rcu_pending(cpu))
|
|
|
+ return; /* if nothing for RCU to do. */
|
|
|
if (user ||
|
|
|
(idle_cpu(cpu) && rcu_scheduler_active &&
|
|
|
!in_softirq() && hardirq_count() <= (1 << HARDIRQ_SHIFT))) {
|
|
@@ -1329,7 +1332,7 @@ static int __rcu_pending(struct rcu_state *rsp, struct rcu_data *rdp)
|
|
|
* by the current CPU, returning 1 if so. This function is part of the
|
|
|
* RCU implementation; it is -not- an exported member of the RCU API.
|
|
|
*/
|
|
|
-int rcu_pending(int cpu)
|
|
|
+static int rcu_pending(int cpu)
|
|
|
{
|
|
|
return __rcu_pending(&rcu_sched_state, &per_cpu(rcu_sched_data, cpu)) ||
|
|
|
__rcu_pending(&rcu_bh_state, &per_cpu(rcu_bh_data, cpu));
|