This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [PATCH] ppc32 dl-machine.c
- From: "Steve Munroe" <sjmunroe at us dot ibm dot com>
- To: Geoff Keating <geoffk at geoffk dot org>
- Cc: anton at samba dot org, libc-alpha at sources dot redhat dot com, libc-alpha-owner at sources dot redhat dot com, roland at frob dot com, sjmunroe at vnet dot ibm dot com
- Date: Wed, 25 Sep 2002 14:06:38 -0500
- Subject: Re: [PATCH] ppc32 dl-machine.c
Geoff Keating writes:
> The original proposed patch was something like:
>
> --- glibc-2.2.5/sysdeps/powerpc/dl-machine.c~ Sun Sep 9 07:21:34
> 2001
> +++ glibc-2.2.5/sysdeps/powerpc/dl-machine.c Fri May 10 12:58:04
> 2002
> @@ -311,7 +311,8 @@
> PPC_DCBST (plt + i);
> PPC_DCBST (plt + size_modified - 1);
> PPC_SYNC;
> - PPC_ICBI (plt);
> + for (i = 0; i < size_modified; i += 4)
> + PPC_ICBI (plt + i);
> PPC_ICBI (plt + size_modified - 1);
> PPC_ISYNC;
> }
>
> your patch looks much less efficient. Can you explain the
> differences?
>
> Please remember, PPC_SYNC is a very expensive operation. It
> requires a bus broadcast and therefore takes tens of cycles.
The patch above did give me enough context to see that there should be two
separate "for loops" (one for DCBST and one ICBI).
I'll make the change, test, and resubmit.