This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Add wake optimisation to PowerPC POSIX semaphores
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Anton Blanchard <anton at samba dot org>
- Cc: libc-alpha at sources dot redhat dot com, sjmunroe at us dot ibm dot com
- Date: Mon, 30 Jul 2007 20:28:37 +0200
- Subject: Re: [PATCH] Add wake optimisation to PowerPC POSIX semaphores
- References: <20070730175955.GB13661@kryten>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Jul 30, 2007 at 12:59:55PM -0500, Anton Blanchard wrote:
>
> Update PowerPC POSIX semaphores to call lll_futex_wake only when there
> are waiters. The performance of calls to sem_wait and sem_post improve
> as expected:
>
> baseline of sem_wait+sem_post:
> 1629.22 cycles
>
> patched:
> 261.38 cycles
Heh, this is almost the same as I posted last week in
http://sources.redhat.com/ml/libc-hacker/2007-07/msg00044.html
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.
Jakub