Re: [PATCH 1/2] ipc semaphores: reduce ipc_lock contention in semtimedop

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Manfred Spraul
Date: Wednesday, April 14, 2010 - 12:11 pm

On 04/14/2010 07:33 PM, Chris Mason wrote:
Hmm. Thus you have:
- single sembuf decrease operations that are waiting frequently.
- multi-sembuf  increase operations.

What about optimizing for that case?
Increase operations succeed immediately. Thus complex_count is 0.

If we have performed an update operation, then we can scan all 
simple_lists that have seen an increase instead of checking the global 
list - as long as there are no complex operations waiting.
Right now, we give up if the update operation was a complex operation - 
but that does not matter.
All that matters are the sleeping operations, not the operation that did 
the wakeup.
I've attached an untested idea.

Ok. Then simple tricks won't help.
How many semaphores are in one array?

--
     Manfred
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH RFC] Optimize semtimedop, Chris Mason, (Mon Apr 12, 11:49 am)
Re: [PATCH 1/2] ipc semaphores: reduce ipc_lock contention ..., Manfred Spraul, (Wed Apr 14, 12:11 pm)