[PATCH] Add wake optimisation to PowerPC POSIX semaphores

Anton Blanchard anton@samba.org
Tue Jul 31 02:21:00 GMT 2007


Hi Jakub,

> Heh, this is almost the same as I posted last week in
> http://sources.redhat.com/ml/libc-hacker/2007-07/msg00044.html

Sorry I didnt realise your patch fixed this issue, but good to know I
was on the right track :)

> The only differences are: I used atomic_full_barrier,
> guess your __asm __volatile (__lll_acq_instr ::: "memory"); is better
> and LLL_SHARED shouldn't be used in the new sem_post case,
> but isem->private ^ FUTEX_PRIVATE_FLAG.

Yep atomic_full_barrier is a full sync which is very slow. The
lwarx/stwcx/bne/isync combination should still force subsequent loads to
be ordered, but should be quicker.

Anton



More information about the Libc-alpha mailing list