A multiprocessor data processing system (MDPS) with a weakly-ordered architecture providing processing logic for substantially eliminating issuing sync instructions after every store instruction of a well-behaved application. Instructions of a well-behaved application are translated and executed by a weakly-ordered processor. The processing logic includes a lock address tracking utility (LATU), which provides an algorithm and a table of lock addresses, within which each lock address is stored when the lock is acquired by the weakly-ordered processor. When a store instruction is encountered in the instruction stream, the LATU compares the target address of the store instruction against the table of lock addresses. If the target address matches one of the lock addresses, indicating that the store instruction is the corresponding unlock instruction (or lock release instruction), a sync instruction is issued ahead of the store operation. The sync causes all values updated by the intermediate store operations to be flushed out to the point of coherency and be visible to all processors.
Legal claims defining the scope of protection, as filed with the USPTO.
1. A method for improving processing efficiency of operations of a well-behaved application executing on a weakly-ordered processor, said method comprising: in a weakly-ordered processor executing a well-behaved application, first determining a value of a lock flag within the weakly-ordered processor, wherein the lock flag is one of two values with a first value indicating that sync instructions are to be issued after each store operation and before issuance of a next, subsequent store operation, and a second value indicating that sync instructions are not to be issued after each store operation during a lock phase, wherein issuance of a sync instruction after a store operation causes the store operation to be completed before a subsequently issued store operation is completed, so that all store operations are completed in sequential order of issuance; when the lock flag is set the first value, issuing sync instructions after each store operation of the well-behaved application; when the lock flat is set to the second value: tracking an address of a lock when the lock is initially obtained at the processor, wherein said tracking of an address of a lock comprises storing the address in a link-list of lock addresses; determining when a subsequent store instruction issued from the processor is an unlock instruction, wherein said subsequent store instruction is an unlock instruction when the subsequent store instruction targets the address of the lock and wherein all other subsequent store instructions issued before the unlock instruction are intermediate stores that are executed without requiring issuance of a sync instruction after each store and which do not affect the lock obtained by the processor; wherein said determining comprises checking an address of the store instruction against the link-list of lock addresses for a match; withholding the issuance of a synchronization (sync) instruction following the store instruction when the store instruction is not the unlock instruction, wherein the issuance of a sync instruction is withheld after each intermediate store operation that is not the unlock instruction; and responsive to the determining, generating and issuing a sync instruction prior to executing the unlock instruction, wherein said sync instruction makes updates generated by the intermediate stores visible at a point of coherency before executing the unlock instruction; wherein a single sync instruction is issued prior to the unlock instruction to synchronize all intermediate stores at the point of coherence.
2. The method of claim 1 , wherein the point of coherency is a lower level cache visible to each processor within a multiprocessor data processing system in which said weakly-ordered processor is operating.
3. The method of claim 1 , further comprising flushing all data generated by said intermediate stores out to the point of coherency.
4. The method of claim 1 , wherein: said tracking of an address of a lock comprises storing the address in a table of lock addresses; and said determining comprises checking an address of the store instruction against the table of lock addresses for a match.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
December 7, 2004
November 18, 2008
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.