File tree Expand file tree Collapse file tree 2 files changed +17
-7
lines changed
Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,23 @@ the rationale will be added over time.
1212In cases where the rationale was not recorded, the authors and editors will
1313synthesize it from the historical record.
1414
15+ === "Zihintpause" Extension for Pause Hint
16+
17+ The PAUSE instruction hints to a hart that it should temporarily reduce its
18+ rate of execution.
19+ It is normally used to save energy and execution resources while polling, e.g.
20+ while waiting for a spinlock to become free.
21+
22+ Much of the debate surrounding this extension centered on whether a facility
23+ similar to x86's MONITOR/MWAIT should instead be provided.
24+ We concluded that, even if such a facility were to be defined for RISC-V,
25+ it would not supplant PAUSE.
26+ PAUSE is more appropriate when polling for non-memory events, when polling for
27+ multiple events, or when software does not know precisely what events it is
28+ polling for.
29+ (Perhaps surprisingly, the latter case is ubiquitous, in part because it is
30+ the mechanism expected by the Linux kernel's `cpu_relax` API.)
31+
1532=== "Zicond" Extension for Integer Conditional Operations
1633
1734Replacing unpredictable branches with conditional-select or conditional-move
Original file line number Diff line number Diff line change @@ -15,13 +15,6 @@ executed. It is recommended that a PAUSE instruction generally be
1515included in the code sequence for a spin-wait loop.
1616(((PAUSE, energy consumption)))
1717
18- A future extension might add primitives similar to the x86 MONITOR/MWAIT
19- instructions, which provide a more efficient mechanism to wait on writes
20- to a specific memory location. However, these instructions would not
21- supplant PAUSE. PAUSE is more appropriate when polling for non-memory
22- events, when polling for multiple events, or when software does not know
23- precisely what events it is polling for.
24-
2518The duration of a PAUSE instruction's effect may vary significantly
2619within and among implementations. In typical implementations this
2720duration should be much less than the time to perform a context switch,
You can’t perform that action at this time.
0 commit comments