As a Linux kernel programmer, I have been learned to use RCU instead of rwlock to obtain high performance. However RCU only provide the following API without parameter to service protection of all kinds of data types.
rcu_read_lock()
rcu_read_unlock()
As rwlock
will hold an argument lock
for each individual.
read_lock(lock)
write_lock(lock)
If RCU only hold a system global lock, it it reasonable? The reclamation blocks until all readers of others data types to finish. Will it harm the global system performance?