diff options
author | Eric Dumazet <edumazet@google.com> | 2014-04-16 12:06:24 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-04-29 11:45:40 -0400 |
commit | a5d6d3a1b00a0ad88f07c3a727c79b27915278e3 (patch) | |
tree | 0be0f5f7f7d538fcd6ec500b6a2f9380160da3e5 /kernel/softirq.c | |
parent | fa07a58f71ee23a82597ce337126982d0cc60b72 (diff) |
softirq: A single rcu_bh_qs() call per softirq set is enough
Calling rcu_bh_qs() after every softirq action is not really needed.
What RCU needs is at least one rcu_bh_qs() per softirq round to note a
quiescent state was passed for rcu_bh.
Note for Paul and myself : this could be inlined as a single instruction
and avoid smp_processor_id()
(sone this_cpu_write(rcu_bh_data.passed_quiesce, 1))
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'kernel/softirq.c')
-rw-r--r-- | kernel/softirq.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/softirq.c b/kernel/softirq.c index b50990a5bea0..b9b2d4906848 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c | |||
@@ -232,7 +232,6 @@ asmlinkage void __do_softirq(void) | |||
232 | bool in_hardirq; | 232 | bool in_hardirq; |
233 | __u32 pending; | 233 | __u32 pending; |
234 | int softirq_bit; | 234 | int softirq_bit; |
235 | int cpu; | ||
236 | 235 | ||
237 | /* | 236 | /* |
238 | * Mask out PF_MEMALLOC s current task context is borrowed for the | 237 | * Mask out PF_MEMALLOC s current task context is borrowed for the |
@@ -247,7 +246,6 @@ asmlinkage void __do_softirq(void) | |||
247 | __local_bh_disable_ip(_RET_IP_, SOFTIRQ_OFFSET); | 246 | __local_bh_disable_ip(_RET_IP_, SOFTIRQ_OFFSET); |
248 | in_hardirq = lockdep_softirq_start(); | 247 | in_hardirq = lockdep_softirq_start(); |
249 | 248 | ||
250 | cpu = smp_processor_id(); | ||
251 | restart: | 249 | restart: |
252 | /* Reset the pending bitmask before enabling irqs */ | 250 | /* Reset the pending bitmask before enabling irqs */ |
253 | set_softirq_pending(0); | 251 | set_softirq_pending(0); |
@@ -276,11 +274,11 @@ restart: | |||
276 | prev_count, preempt_count()); | 274 | prev_count, preempt_count()); |
277 | preempt_count_set(prev_count); | 275 | preempt_count_set(prev_count); |
278 | } | 276 | } |
279 | rcu_bh_qs(cpu); | ||
280 | h++; | 277 | h++; |
281 | pending >>= softirq_bit; | 278 | pending >>= softirq_bit; |
282 | } | 279 | } |
283 | 280 | ||
281 | rcu_bh_qs(smp_processor_id()); | ||
284 | local_irq_disable(); | 282 | local_irq_disable(); |
285 | 283 | ||
286 | pending = local_softirq_pending(); | 284 | pending = local_softirq_pending(); |