X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=kernel%2Frcu%2Ftree.c;h=4c06ddfea7cd2beffbf428a952e1efada1d1fa57;hb=762fb1ddd561aac5b14afac19287672b99242811;hp=8a2c81e86dda102608b842f77f6258b16914d5d6;hpb=0e95c69bde1a5bf22acd53b356fe10d7bec6e2be;p=cascardo%2Flinux.git diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 8a2c81e86dda..4c06ddfea7cd 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -916,6 +916,12 @@ static void print_other_cpu_stall(struct rcu_state *rsp) force_quiescent_state(rsp); /* Kick them all. */ } +/* + * This function really isn't for public consumption, but RCU is special in + * that context switches can allow the state machine to make progress. + */ +extern void resched_cpu(int cpu); + static void print_cpu_stall(struct rcu_state *rsp) { int cpu; @@ -945,7 +951,14 @@ static void print_cpu_stall(struct rcu_state *rsp) 3 * rcu_jiffies_till_stall_check() + 3; raw_spin_unlock_irqrestore(&rnp->lock, flags); - set_need_resched(); /* kick ourselves to get things going. */ + /* + * Attempt to revive the RCU machinery by forcing a context switch. + * + * A context switch would normally allow the RCU state machine to make + * progress and it could be we're stuck in kernel space without context + * switches for an entirely unreasonable amount of time. + */ + resched_cpu(smp_processor_id()); } static void check_cpu_stall(struct rcu_state *rsp, struct rcu_data *rdp)