Currently the use of three type of IPC resources(semaphores, message
queues and shared memory segments) are synchronized by three global
locks respectively. This means, for example, all semaphores are going
to share one global lock. Although the IPC locks are not highly used as
the BKL, on some applications which use lots of IPC resources(e.g. IPC
semaphores), there could be contention.
It makes more sense to me if we break the one globale lock for all
semaphores into one lock per sempahore id(same for message queue
id/shared memory id). I attached a patch which implements this idea.
Just sharing my thoughts with you. Please send any of your comments to
Patch applies against 2.5.25, also for 2.4.18.
IBM Linux Technology Center