Re: [patch 4/4] ipc: sem optimise simple operations

Manfred Spraul
2009-08-14T17:57:54Z

On 08/14/2009 10:58 AM, Nick Piggin wrote:
> I do like how it cleanly splits the modify and non-modify operations
> though. But if you feel strongly about saving the sapce, I will
> do as you suggest.
>
>
No, saving space is secondary.

IMHO the global and the local lists should use the same algorithm,
that's the main point.
Perhaps even the same function could be used:
One global struct sem_waiters {struct list_head zero; struct list_head
decrease}.
One struct sem_waiters for each semaphore.

Then something like

update_queue(sma, sma->complex_ops ? &sma->global_waiters :
&sma->sem_base[i].local_waiters);

--
Manfred