Re: [patch 4/4] ipc: sem optimise simple operations
From: Manfred Spraul
Date: Wed Aug 12 2009 - 14:42:26 EST
On 08/12/2009 06:07 AM, Nick Piggin wrote:
A semaphore set with 250 will use 2K before, and 10K afterward. I
don't know that it is a huge amount really, given that they also
have to presumably be *protecting* stuff.
The allocation uses vmalloc for larger allocations, thus 10k should not
be an issue.
We can convert them to hlists (I was going to send a patch to do
everything in hlists, but hlists are missing some _rcu variants...
maybe I should just convert the pending lists to start with).
Is it possible to use list_add and list_add_tail instead?
Add the "waiting for zero" to the beginning and "waiting for nonzero" to
the end.
Basically, the same approach for "simple" and "complex" operations:
- if all operations are simple operations, then all operations affect
only individual semaphores
--> use per semaphore lists
- if there is one complex operation, then the global, per
semaphore-array lists are used.
--
Manfred
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/