Source
1
+
====================
1
2
Percpu rw semaphores
2
-
--------------------
3
+
====================
3
4
4
5
Percpu rw semaphores is a new read-write semaphore design that is
5
6
optimized for locking for reading.
6
7
7
8
The problem with traditional read-write semaphores is that when multiple
8
9
cores take the lock for reading, the cache line containing the semaphore
9
10
is bouncing between L1 caches of the cores, causing performance
10
11
degradation.
11
12
12
13
Locking for reading is very fast, it uses RCU and it avoids any atomic