Hi Vince,

Thanks for your reply. I've tried with -O0 and without any optimization
flags (not sure what gcc defaults to, now that I think about it) and I get
roughly the same thing. If I print out the values of the two sums, that will
force it to not optimize them out, right?

I was reading that it was possible to disable prefetching in linux but I was
not looking forward to implementing it, so thanks for that! I'll give it a
shot.

I've even tried reversing the row/column loops to try to make the stride
larger, and I get higher miss rates, but not as high as I'd expect.

And your point about being impossible to correlate measured to expected,
could you provide any more insight? I'm quite baffled at the miss rates for
workloads that I know will miss _every_ access in the main program loop
(i.e. random memory walks in large array).

Thanks,
Paul

On Mon, Sep 13, 2010 at 5:27 PM, Vince Weaver <vweav...@eecs.utk.edu> wrote:

>
> > $ ./task -e LLC_MISSES,LLC_REFERENCES ./mcol
> > Allocating 16 MiB for 1024x1024 matrix
> > 1677.72MiB/s
> >
> >            2,126,459 LLC_MISSES (4,739,259,550 : 4,739,259,550)
> >          131,373,392 LLC_REFERENCES (4,739,259,550 : 4,739,259,550)
>
> what compiler options did you use when compiling?
>
> on my core2 machine when compiled with "-O2 -Wall" I get
> Allocating 16 MiB for 1024x1024 matrix
> infMiB/s
>
>              16,314 LLC_MISSES (0.00% scaling, ena=32,442,281,
> run=32,442,281)
>              60,686 LLC_REFERENCES (0.00% scaling, ena=32,442,281,
> run=32,442,281)
>
> This is because your code never uses the matrix values, so the compiler is
> free to optimize them out as a nop.  If you're not compiling with
> optimizations enabled then you're likely to see inefficient memory access
> patterns.
>
> Vince
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to