From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 110292,45b50f14dadfce5b X-Google-Attributes: gid110292,public X-Google-Thread: 1164f8,45b50f14dadfce5b X-Google-Attributes: gid1164f8,public X-Google-Thread: 102b75,45b50f14dadfce5b X-Google-Attributes: gid102b75,public From: boo Subject: Re: Final kick at the "Merced Guessing Game" Date: 1997/10/15 Message-ID: <34452746.3F9BC63B@boo.boo>#1/1 X-Deja-AN: 280796136 References: <61g30t$o2n@news-rocq.inria.fr> <343CE2F4.362D80F0@tonys.ecology.umn.edu> <343EF1C9.61670DFC@tonys.ecology.umn.edu> <343FAA72.2ED97125@acm.org> <61tnd5$6m8@usenet.srv.cis.pitt.edu> <61uvsh$br0$1@goanna.cs.rmit.edu.au> Organization: boo Newsgroups: comp.sys.intel,comp.arch,comp.sys.dec Richard A. O'Keefe wrote: > > geest3+@pitt.edu (Gregg E Economou) writes: > >You miss the point that while yes, they may be physically multidimensional, > >and even organisationally multidimensional, and even architecturally > >multidimensional, they are *logically* linear, and accessed in a linear > >fashion. Yes, there are strange exceptions out there, but the majority > >of memories are linear int the majorities or architectures and the > >majority of machines ever designed, made, or sold. > > With everybody accusing everyone else of missing *the* point, > perhaps it is time to make *a* point. > > Today, if you want to write high-performance code on stock hardware, > you have to view your plain ordinary so-called 'linear' address space > as three dimensional. > > For example, I am writing this on an UltraSPARC 2. > > Level 1 data cache: (The L1 code cache is the same, > 16 kbytes I _think_) > 32 bytes per line > 1-way association > > Level 2 cache: (Unified, I _think_) > 512 kbytes > 64 bytes per line > 1-way association > > VM > 2 Gbytes > 8 kbytes per page > > Physical memory > 512 Mbytes Yes, you have made a point. You have made the point that memory is not uniform, you have not made the point that memory is multi-dimensional. Perhaps I should discuss exactly what I meant when I mentioned "multi-dimensionality". When I use the word "4 dimensional", for example, I usually refer to a situation where there are certain symmetries present, not matter which direction (or axis) you are pointing along. (I should point out, proudly, that I have had no formal computer training of any kind, ever, so I may not use the same terms that you use in that Ivory Tower of yours over there). In the context of memory, I naturally assumed that any sensible person would realize that the symmetry of interest would be "speed of access". What you have described does NOT have this symmetry, and therefore I cannot fathom why you would claim that it is multi-dimensional. I can only assume you are using some broader abstract concept of the term, which does not really fit well with my scientific concepts. The fact that you have various components of the memory system is meaningless! OF COURSE, you are going to have to take into account the fact that there are registers, various levels of cache, local memory, shared memory, virtual memory.... Only a poor programmer would not take this into account! However, all this proves is that you have a 1+1+1+...+1 dimensional structure to your memory, and 1+1 is NOT equal to 2. You can still make most efficient use of the memory through the use of one dimensional structures, whilst optimizing data layout and use in such a way as to maximize usage of the cache, main memory, etc. Ok, now let me discuss where MY use of the word "dimensional". Say for example, you are working with a 3D or 4D "array", representing space or space-time. The actual symmetries of spacetime are reflected in the fact that you would do best with a memory system in which access is equally fast no matter which axis you are doing access along. (If you want specifics, imagine some kind of a N-dimensional 3rd order derivative operator, requiring information from neigboring points in the 2N directions). When I said "memory is not multi-dimensional", I meant "memory access is not equally fast along all axes of a multi-dimensional array". Of course it is not!! Some points are in the cache, some may be stored in registers from some previous calculation, some are in main memory, some may be on another node in some MPP supercomputer. I know that high performance fortran actually usually does an excellent job of optimizing the calculations, but my personal experience is that I can usually do better by really thinking hard, and coming up with an algorithm that realizes that the various ONE-DIMENSIONAL components of the memory system are utilized in an optimal manner. And as I said elsewhere, most people don't need to bother wasting their time on this kind of optimization, but for me, doing so can reduce a simulation from one month down to one week, on a 300 Gflop supercomputer that I have very limited resources on. It is amazing that almost everyone jumped on my statement that memory is not multi-dimensional with absurds comments about the "multi-dimensional structure of memory hardware". I suggest you all replace "dimensional" with "component" in the above phrase, to which I reply: DUH