]> git.baikalelectronics.ru Git - kernel.git/commit
percpu-rw-semaphores: use light/heavy barriers
authorMikulas Patocka <mpatocka@redhat.com>
Mon, 22 Oct 2012 23:37:47 +0000 (19:37 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 28 Oct 2012 17:59:36 +0000 (10:59 -0700)
commit6634e373a23dad3da5310720cb8c7e43b8cd8e33
treed97aab24d8d0abbd8378e7c851f7a55d266bb851
parent2149fd83bf509a1c9f2addb02976388615e650e8
percpu-rw-semaphores: use light/heavy barriers

This patch introduces new barrier pair light_mb() and heavy_mb() for
percpu rw semaphores.

This patch fixes a bug in percpu-rw-semaphores where a barrier was
missing in percpu_up_write.

This patch improves performance on the read path of
percpu-rw-semaphores: on non-x86 cpus, there was a smp_mb() in
percpu_up_read. This patch changes it to a compiler barrier and removes
the "#if defined(X86) ..." condition.

From: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/percpu-rwsem.h