prefetch interfaces [PSARC/2009/039 Self Review]

James Carlson james.d.carlson at sun.com
Wed Jan 21 09:23:33 PST 2009


Garrett D'Amore - sun microsystems writes:
> Add inlines for i386/amd64 and sparcv9 for the following types of prefetch:
> 
> void prefetch_read_many(void *)
> 
> This requests data be loaded into a cache for repeated reading. (This
> equates to a 't0' prefetch on x86 CPUs).
> 
> void prefetch_read_once(void *)
> 
> This requests data be loaded into a cache for one read only, so it can
> be flushed from the cache immediately after access. (This equates to a
> 'nta' prefetch on x86 CPUs).

Are there SPARC equivalents?  Have you considered other CPUs?

On PPC, there are four related instructions that I know about:

	dcbt	- data cache block touch
	dcbtst	- data cache block touch for store
	dcbz	- data cache block set to zero
	dcbf	- data cache block flush

The first of those sounds like prefetch_read_many().  The others seem
not to match up ... but *perhaps* they're rare enough (buried within
bcopy and bzero) that nobody cares ... ?

-- 
James Carlson, Solaris Networking              <james.d.carlson at sun.com>
Sun Microsystems / 35 Network Drive        71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677



More information about the opensolaris-arc mailing list