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

From: Manfred Spraul
Date: Fri Aug 14 2009 - 13:58:03 EST


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
--
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/