Fw: RFC: Prefetch instruction support

Tim Prince tprince@computer.org
Tue Apr 11 22:44:00 GMT 2000


----- Original Message -----
From: "Tim Prince" <tprince@computer.org>
To: <norbert.juffa@amd.com>; <Frank.Heldt@t-online.de>;
<hubicka@atrey.karlin.mff.cuni.cz>
Cc: <egcs@egcs.cygnus.com>; <alex.dreyzen@amd.com>
Sent: Tuesday, April 11, 2000 5:53 PM
Subject: Re: RFC: Prefetch instruction support


> I believe you are correct about the possibility of prefetch with large
> strides producing misses; that would be a reason for not going too
> aggressive on prefetch distance.
>
> I have looked at the effect of prefetch in the Livermore Fortran Kernels
(on
> r10k/r12k and hppa) .  As far as prefetch is concerned, it makes little
> difference whether you run them in Fortran or C.  I came to the conclusion
> that this benchmark doesn't respond as well as most real applications to
the
> use of prefetch.  If that is so, it would have the advantage of not
> encouraging you to be too aggressive with prefetch; what works there would
> be likely to work elsewhere.  Another interesting feature is that it shows
> several points where increasing loop length produces a drop in performance
> due to cache effects; it would be interesting to see if prefetch made this
> better or worse.
>
>  I did a lot of work to make my version of LFK more friendly to compilers,
> not to depend too much on the compiler being tuned to the specific strange
> ways of coding seen there.  I'm afraid I would stir up lots of arguments
if
> I should contribute my own pet C version to the vast collection already
> existing, but I do think the effect of prefetch is more likely to show up
if
> there aren't other unnecessary bottlenecks.  For the purpose of
> benchmarking, it is entirely feasible to put just the kernel function in
C,
> leaving the rest of the test framework in g77, and of course I have more
> confidence in running it that way. If someone knows a full C version in
> which they have confidence, I'd be glad to look at it.  I would hope that
> your prefetch work would be equally applicable to gcc and g77, so I have
no
> problem testing whichever way you like.
>
> Another possibly contentious issue is the means for timing.  I have found
it
> best on x86 to use the PerformanceQuery() calls on Windows, or the rdtsc
> instruction in linux, on those machines where that works.  Otherwise, runs
> over 30 minutes are required, and there is no possibility of seeing any
cold
> cache effects (not that LFK does as well in this respect as it claims).
>
> Sure wish I could go hack at this and stop looking for employment.
>
> ----- Original Message -----
> From: <norbert.juffa@amd.com>
> To: <tprince@computer.org>; <Frank.Heldt@t-online.de>;
> <hubicka@atrey.karlin.mff.cuni.cz>
> Cc: <egcs@egcs.cygnus.com>; <alex.dreyzen@amd.com>
> Sent: Tuesday, April 11, 2000 3:51 PM
> Subject: RE: RFC: Prefetch instruction support
>
>
> > Do you have any pieces of C code that would benefit from
> > prefetching that Jan can use to test his changes? I agree
> > that more complex real world code is better than a small
> > benchmark for assessing the quality of an optimization. Of
> > course STREAM is the ultimate memory bandwidth limited
> > program so is valid data point in this case although an
> > artificial benchmark.
> >
>
>



More information about the Gcc mailing list