[Prev][Next][Index][Thread]
Re: Speedometer Results Overrated?
>>>>> "Brian" == Brian Quinlan <quinlan@news.sfu.ca> writes:
In article <4e65tt$4bq@morgoth.sfu.ca> quinlan@news.sfu.ca (Brian Quinlan) writes:
Brian> Clifford T. Matthews <ctm@ardi.com> writes:
>> In addition, Executor has to be aware of self-modifying code.
>> After all, if it memorizes that a particular set of m68k
>> instructions map into a set of x86 instructions, if the
>> original m68k instructions are changed then Executor needs to
>> throw away the mapped instructions and do another recompile. I
>> don't know how MACCHESS 2.0 works, but if it dynamically builds
>> board evaluators and then jumps into them, then Executor's
>> performance will suffer for that.
Brian> Why do you support instruction modification? The 040 and
Brian> PPC Macs won't always run programs which use instruction
Brian> modification due to their caches.
I wasn't clear. On an '040 with both caches enabled, whenever new
instructions are loaded into memory (including when a new program is
loaded), the caches need to be flushed. This is done either by
directly accessing the cache control register or by calling one of a
few different OS calls that Apple provides for this purpose.
Executor detects when the cache control register is modified or when
these calls are made and then has to figure out which, if any,
recompiled pieces of code need to be discarded. This can be a
substantial performance penalty.
Programs that properly flush the cache after they self-modify, or
build code on the fly should work properly with '040s with the cache
on and should work fine with Executor. Programs that don't properly
flush the cache may indeed break on '040s with the cache enabled and
under Executor.
Again, I have no idea whether or not MACCHESS 2.0 actually creates
code on the fly and jumps to it, but it is indeed a legitimate thing
to do, as long as the program flushes the cache before making the
jump. If it *does* do that, then it would explain the major
discrepancy between Speedometer numbers and MACCHESS 2.0.
--Cliff
ctm@ardi.com
References: