Bug 314598
| Summary: | Use isb in ParkingLot spinloop on ARM64 | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Marcus Plutowski <marcus_plutowski> |
| Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Marcus Plutowski
Currently, ParkingLot on ARM64 uses `yield` instruction. External experimentation has shown that it’s preferable to use an `isb` instruction instead.
https://github.com/rust-lang/rust/commit/c064b6560b7ce0adeb9bbf5d7dcf12b1acb0c807
The explantation there is not 100% accurate — an isb does not “put the core to sleep” per se, but by draining the out-of-order buffer and preventing the dispatch of younger instructions,
it does effectively throttle execution until fetch gets past the block of isb instructions. The core continues executing but fully in-order.
The upside is more determinism and generally less power consumption.
This will require retuning the nop-counts.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Marcus Plutowski
<rdar://problem/176840292>
Marcus Plutowski
Pull request: https://github.com/WebKit/WebKit/pull/64733
EWS
Committed 313082@main (1e389bdbdcc4): <https://commits.webkit.org/313082@main>
Reviewed commits have been landed. Closing PR #64733 and removing active labels.