home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!swrinde!mips!mash
- From: mash@mips.com (John Mashey)
- Newsgroups: comp.sys.sgi
- Subject: Re: R4000 compiler directive, is there one ???
- Message-ID: <l8tjcfINN25c@spim.mips.com>
- Date: 16 Aug 92 21:50:07 GMT
- References: <6984@charon.cwi.nl>
- Organization: MIPS Computer Systems, Inc.
- Lines: 39
- NNTP-Posting-Host: winchester.mips.com
-
- In article <6984@charon.cwi.nl> robertl@cwi.nl (Robert van Liere) writes:
- >In article <????> mash@mips.com writes:
- > [.... some analysis of R[34]K caches, load/store patterns, thrashing ...]
-
- >It isn't a compiler directive, but perhaps the system call 'cachecntl'
- >can be used to avoid these problems. The manual says it "allows a process
- >to ranges of its address space cacheable or uncachable". I wouldn't know
- >how this call can be used in the aforementioned Fortran program, but I
- >suspect that it could help in a C program which depicts the same behavior.
- >
- >How would 'cachecntl' effect this analysis ? On the R3K ? On the R4K ?
-
- It is possible ... but I generally wouldn't recommend it.
- Cachecntl is plausiably used for things like graphics frame buffers,
- which may actually be mostly-write in practice, or for accessing
- device registers (whihc must be uncached for sanity).
-
- Unless you are very careful with cachecntl, there is great potential
- for difficult-to-find bugs. The effect you might want to get
- (high bandwidth to/from uncached address space) is not as strongly
- supported yet by R4000s as you might like, although R4000As
- improve it, and in general, it can only work on pagesize
- boundaries.
-
- Please note, of course, that very few real programs look
- remotely like the benchmark described. In general, the rule
- of thumb, on the average, is that loads from memory are 20%
- ofthe instruction, and stores to memory 10%. Rarely does
- one find a program that is something like 90% stores....
- Although caches certainly od *not* work all of the time,
- more often than not they do work. It remains an unresolved
- issue to get the advantages of uncached and cached accesses
- together, in general, without difficult programming;
- people are certainly working on it for future designs.
- --
- -john mashey DISCLAIMER: <generic disclaimer, I speak for me only, etc>
- UUCP: mash@mips.com [soon to be mash@sgi.com, but not quite moved yet].
- DDD: 408-524-7015, or 524-8253
- USPS: (soon) Silicon Graphics, 2011 N. Shoreline Blvd, Mountain View, CA 94043
-