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]

Re: performance in sysdeps/powerpc/memset.S


Olaf Hering wrote:
> 
> On Thu, Jul 12, Geoff Keating wrote:
> 
> > > Date: Thu, 12 Jul 2001 14:33:37 +0200
> > > From: Olaf Hering <olh@suse.de>
> >
> > > there are some problems with current sysdeps/powerpc/memset.S.
> > > It prevents booting a POWER3 machine, and it also slows down memset().

<decloak>

Greetings!

> > Can you analyze the booting problem further?  I suspect the difficulty
> > is due to the use of the dcbz instruction.  Perhaps rewriting the
> > routine to not use this instruction would help.
> 
> Its that dcbz instruction, some IBM guys working on it. But since a rm
> is faster than a vi (or emacs:) it should be a real rewrite to gain
> speed :)

That "some IBM guys" would be me.

Basically here's the problem with the current sysdeps/powerpc/memset.S. It
assumes that cacheline sizes are only 32 bytes in size. This is incorrect as
there are both embedded PowerPC chips with smaller (16 bytes) and server PowerPC
chips with larger (64 and 128 byte) cache line sizes. At the time the code was
written however it was probably spot on. Times changes I guess.

> > When I originally wrote this routine it provided about a 50% speedup
> > on my 601.  It's possible there are changes that would make it
> > go faster on newer machines and keep its speed on older ones.

I noticed the 601 aspects.
 
> I will try the test on a 601 soon.

My goal is that everyone have a pleasant speedup. Tho Olaf was telling me today
that the generic memset was faster than the optimized version. I find this
surprising. I haven't tried this myself but certainly as my fix get's out of the
debug phase, I shall be quite interested that the performance numbers are good
for everyone.
 
Regards,

Tom
-- 
Tom Gall - PPC64 Maintainer      "Where's the ka-boom? There was
Linux Technology Center           supposed to be an earth
(w) tom_gall@vnet.ibm.com         shattering ka-boom!"
(w) 507-253-4558                 -- Marvin Martian
(h) tgall@rochcivictheatre.org
http://www.ibm.com/linux/ltc/projects/ppc


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