浏览代码

ksoftirqd: Use new cond_resched_rcu_qs() function

Simplify run_ksoftirqd() by using the new cond_resched_rcu_qs() function
that conditionally reschedules, but unconditionally supplies an RCU
quiescent state.  This commit is separate from the previous commit by
Calvin Owens because Calvin's approach can be backported, while this
commit cannot be.  The reason that this commit cannot be backported is
that cond_resched_rcu_qs() does not always provide the needed quiescent
state in earlier kernels.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Paul E. McKenney 10 年之前
父节点
当前提交
60479676eb
共有 1 个文件被更改,包括 1 次插入6 次删除
  1. 1 6
      kernel/softirq.c

+ 1 - 6
kernel/softirq.c

@@ -657,12 +657,7 @@ static void run_ksoftirqd(unsigned int cpu)
 		 */
 		 */
 		__do_softirq();
 		__do_softirq();
 		local_irq_enable();
 		local_irq_enable();
-		cond_resched();
-
-		preempt_disable();
-		rcu_note_context_switch();
-		preempt_enable();
-
+		cond_resched_rcu_qs();
 		return;
 		return;
 	}
 	}
 	local_irq_enable();
 	local_irq_enable();