Closed
Bug 1248670
Opened 10 years ago
Closed 10 years ago
SAB+Atomics "synchronic" API
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: lth, Assigned: lth)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 1 obsolete file)
|
19.29 KB,
patch
|
Details | Diff | Splinter Review | |
|
13.03 KB,
patch
|
Details | Diff | Splinter Review |
The futex API is very difficult to use correctly and efficiently, there are footguns and performance traps everywhere. I'm experimenting with a slightly higher-level API based on the C++ "synchronic" proposal, that can complement or perhaps eventually replace the futex API.
| Assignee | ||
Comment 1•10 years ago
|
||
| Assignee | ||
Updated•10 years ago
|
Attachment #8723044 -
Attachment is obsolete: true
| Assignee | ||
Comment 2•10 years ago
|
||
| Assignee | ||
Comment 3•10 years ago
|
||
An alternative idea: speed up futexes using ideas from synchronics. This code is not quite done. It makes futexes about 10x faster for a simple ping-pong benchmark, which is still about 4x slower than naively implemented synchronics. Additionally, attaining that performance required a number of optimizations and the code is fairly complex (and not vetted, and not quite complete).
It's probably the case that for synchronics to scale well some of these ideas are required for synchronics as well, and that may create some constant overhead that slows down simplistic benchmarks, but for now, "fast futexes" are less appealing than going with synchronics.
| Assignee | ||
Comment 4•10 years ago
|
||
A couple of notes about the fast futexes:
- It's no longer possible to tell how many waiters were woken (because they're spinning and we don't want
to have to account for that) so the "count" argument to futexWake and the return value from ditto
need different semantics.
- It's no longer possible to guarantee that waiters are woken in order - we don't want a spinning waiter to
get stuck behind one that has to be woken up, and a waiter can wake up in any case without a futexWake
call happening.
So these are not really "futexes" in the same sense as before.
Comment 5•10 years ago
|
||
Setting ddn as it helps me to track this. Note that work on dev docs usually only starts once bugs are resolved. Feel free to remove dev-doc-needed if this API remains an experiment (without standardization).
Keywords: dev-doc-needed
| Assignee | ||
Comment 6•10 years ago
|
||
Proposal retracted.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
Updated•10 years ago
|
Keywords: dev-doc-needed
You need to log in
before you can comment on or make changes to this bug.
Description
•