Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: To: Bob Hyatt, Fritz SMP Optimization

Author: Robert Hyatt

Date: 08:31:04 02/20/03

Go up one level in this thread


On February 20, 2003 at 02:49:04, Matt Taylor wrote:

>On February 19, 2003 at 20:05:30, Robert Hyatt wrote:
>
>>On February 19, 2003 at 18:28:12, Charles Worthington wrote:
>>
>>>Bob I am not a programmer. Can you direct me to a source that will enable me to
>>>make the tweaks on the Fritz Spinlocks and Spinwaits myself? Getting chessbase
>>>to do anything would be near impossible.
>>
>>
>>No.  It is a source code modification, which is the problem.  You _might_ be
>>able to use a debugger and find the spinlocks, but inserting a pause instruction
>>might not be possible as it will mean "stretching" the code which would break
>>things without some cute tricks, such as a jump out to the lock and a jump
>>back...
>>
>>I wouldn't want to think about it not having any idea where the locks really
>>are.  :)
>
>It wouldn't be too difficult with a good knowledge of assembly and some good
>tools. Profile for highly localized hotspots (there are your spinlocks) and then
>use code stretching to insert code. I wrote a tool at work that does this for
>Windows programs, but it requires PDB information. I know of no tool on the
>market that is capable of code stretching without such information.
>
>Realistically he might as well ask nicely. :-)
>
>-Matt


That might work.  However, the spinlocks (in crafty) don't get burned a lot, due
to the way
it is designed in attempting to minimize locking.  It might well be possible to
miss a few that
don't get beat on in the particular run.

As I said, it is doable.  I used to have to patch operating systems like that
all the time, where
you need to insert code, which means you replace a good instruction with a jump
to a patch
area, stick the replaced instruction plus the ones you need to add there,
followed by a jump
back to where you came from.

But it is not for the non-ASM person, obviously.



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.