Re: A quick view of the performance benchmark for semaphore-likeand mutex

From: Peter Zijlstra
Date: Tue Apr 17 2012 - 06:13:06 EST


On Tue, 2012-04-17 at 09:36 +0000, Chen, Dennis (SRDC SW) wrote:
>
> Interesting!! Semaphore-like is almost 8s slower than mutex... Also, the Events sycles of perf
> reported is different

I suspect that if you were to use actual semaphores it would be even
worse, the semaphore implementation doesn't do lock-stealing nor does it
have fancy assembly fast paths.

In fact, I don't know why you even bother with sems, they're a
deprecated serialization primitive that really shouldn't be used
anymore.
--
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/