summaryrefslogtreecommitdiffstats
path: root/kernel/softirq.c
diff options
context:
space:
mode:
authorEric Dumazet2014-04-16 18:06:24 +0200
committerPaul E. McKenney2014-04-29 17:45:40 +0200
commita5d6d3a1b00a0ad88f07c3a727c79b27915278e3 (patch)
tree0be0f5f7f7d538fcd6ec500b6a2f9380160da3e5 /kernel/softirq.c
parentrcu: Replace __this_cpu_ptr() uses with raw_cpu_ptr() (diff)
downloadkernel-qcow2-linux-a5d6d3a1b00a0ad88f07c3a727c79b27915278e3.tar.gz
kernel-qcow2-linux-a5d6d3a1b00a0ad88f07c3a727c79b27915278e3.tar.xz
kernel-qcow2-linux-a5d6d3a1b00a0ad88f07c3a727c79b27915278e3.zip
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.c4
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)
bool in_hardirq;
__u32 pending;
int softirq_bit;
- int cpu;
/*
* Mask out PF_MEMALLOC s current task context is borrowed for the
@@ -247,7 +246,6 @@ asmlinkage void __do_softirq(void)
__local_bh_disable_ip(_RET_IP_, SOFTIRQ_OFFSET);
in_hardirq = lockdep_softirq_start();
- cpu = smp_processor_id();
restart:
/* Reset the pending bitmask before enabling irqs */
set_softirq_pending(0);
@@ -276,11 +274,11 @@ restart:
prev_count, preempt_count());
preempt_count_set(prev_count);
}
- rcu_bh_qs(cpu);
h++;
pending >>= softirq_bit;
}
+ rcu_bh_qs(smp_processor_id());
local_irq_disable();
pending = local_softirq_pending();