write_lock_irqsave() is faster than start_bh_atomic(), because
start_bh_atomic calls synchronize_bh currently which can be costly. Also
start_bh_atomic is a global locking algorithm, while write_lock_irqsave
works local which is faster - when irqs are disabled on the current CPU
then other CPUs can still process them. In a start_bh_atomic you block
out all BHs on all CPUs.
> If critical_section() is ``short enough'' (eg. change a bound variable),
> is HARD irq stuff faster than SOFT xx_bh_atomic()?
If it is only a variable setting or increase/decrease/test then you can
use the atomic_set/atomic_inc/atomic_dec/atomic_dec_and_test functions too.
xchg() may also do what you want.
-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html