|
Notes:
There were three global locks in IPC, one per type. To reduce the lock
contention, I have provided a patch which breaks down the global lock into one
lock per ID. But, we still need a rw lock to protect the IPC ID array resizing.
We first used a rw lock. But by doing so added another layer of lock and may
cause cacheline bouncing.
RCU core code was got in 2.5.43 kernel, thus provide a way(by using RCU) to
breaks down IPC locks without adding a new layer of rw lock.
Now IPC ID array resizing is lock free. We also extended the use of RCU in
ipc_rmid() to postpone the real free of a IPC ID until nobody is refering it.
By doing so is to prevent ipc_lock() returning an invalid IPC ID.
The latest patch could be found in sf.net/projects/lse
This patch is depend on ReadCopyUpdate core patchs(in mainline kernel since
2.5.43), which is also avaliable from sf.net/projects/lse
|