Patents
US 9,304,776 B2#15964080 Most CitedActiveUnited States (USPTO)Utility

System and method for mitigating the impact of branch misprediction when exiting spin loops

7Forward Citations (#15964080 Global)
0.7/yrCitation Velocity (#10996105 Global)
1.44Citation PageRank (#24300994 Global)
18Prior Art Cited
1Claims (1 Indep. · 0 Dep.)
0Drawings / Sheets

Abstract

A computer system may recognize a busy-wait loop in program instructions at compile time and/or may recognize busy-wait looping behavior during execution of program instructions. The system may recognize that an exit condition for a busy-wait loop is specified by a conditional branch type instruction in the program instructions. In response to identifying the loop and the conditional branch type instruction that specifies its exit condition, the system may influence or override a prediction made by a dynamic branch predictor, resulting in a prediction that the exit condition will be met and that the loop will be exited regardless of any observed branch behavior for the conditional branch type instruction. The looping instructions may implement waiting for an inter-thread communication event to occur or for a lock to become available. When the exit condition is met, the loop may be exited without incurring a misprediction delay.

Interactive Citation Constellation Global Citation Ranking

Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 18 · Forward citations: 7.

Claims (1 — 1 Independent, 0 Dependent)

  1. Claim 1Independent Claim

    A method, comprising: performing, by a computer: initiating execution of program instructions; determining that the program instructions comprise a busy-wait type loop and that a conditional branch type instruction specifies an exit condition for the busy-wait type loop that, when met, causes an exit path for the busy-wait type loop to be taken following the conditional branch type instruction; and in response to said determining: predicting that the path taken following the conditional branch type instruction will be the exit path for the busy-wait type loop; while the specified exit conditio

Technical Overview & Description

Full multi-page specification text is archived at the issuing office. Read complete official specification ↗

References Cited — Backward Prior Art (18)

PatentTitleYearCitations
US 5,454,117 AConfigurable branch prediction for a processor performing speculative execution1995171
US 5,909,573 AMethod of branch prediction using loop counters199980
US 6,230,261 B1Method and apparatus for predicting conditional branch instruction outcome based on branch condition test type200132
US 2002065968 A1Method and system for low overhead spin lock instrumentation—24
US 6,438,682 B1Method and apparatus for predicting loop exit branches200221
US 2003023959 A1General and efficient method for transforming predicated execution to static speculation—58
US 6,662,360 B1Method and system for software control of hardware branch prediction mechanism in a data processor200331
US 6,678,820 B1Processor and method for separately predicting conditional branches dependent on lock acquisition200410
US 6,754,813 B1Apparatus and method of processing information for suppression of branch prediction200418
US 2005283593 A1Loop end prediction—28
US 2006190710 A1Suppressing update of a branch history register by loop-ending branches—53
US 2007220239 A1Representing loop branches in a branch history register with multiple bits—26
US 2009106536 A1Processor for executing group extract instructions requiring wide operands—2
US 2009158012 A1Method and Apparatus for Performing Improved Group Instructions—52
US 7,877,742 B2Method, system, and computer program product to generate test instruction streams while guaranteeing loop termination201113
US 2011219208 A1Multi-petascale highly efficient parallel supercomputer—619
US 8,230,203 B2Detecting spin loops in a virtual machine environment201211
US 8,904,155 B2Representing loop branches in a branch history register with multiple bits201415

Non-Patent Literature (2)

  • IA-32, "7.6.7.2 Pause Instruction" from IA-32 Intel Architecture Software Developer's Manual vol. 3: System Programming Guide, Intel 2003, p. 7-33.
  • LWN, "Likely unlikely()s", a blog page posted on Dec. 2010, accessed through internet page "Iwn.net/Articles/420019/", pp. 1-5 (hereinafter LWN).