This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]