~/talk

Pardon the Interruption: Loop Preemption in Go 1.14

Talkat GopherCon 2020 · 2020-11-09..11-13· [concurrency, go]
links:none on file
slides:none on file

Go 1.14 adds asynchronous preemption that uses signals (SIGURG) to stop goroutines anywhere and performs conservative innermost frame scanning to find pointers without full stack maps. It reduces preemption delay to ~25 microseconds, adds about 0.3% binary metadata, and has zero steady-state overhead. The implementation avoids per-loop checks, fixes tight-loop 47x throughput stalls and scheduler deadlocks, and works across architectures after kernel and debugger interactions are handled.

AI-written summary · about

  1. 0:00Start
  2. 7:29Preempt back-edges, like other languages
  3. 9:08"Forward simulation" like some languages
  4. 11:11Use interrupts, like an OS kernel
  5. 13:22Signals + GC stack maps at every instruction
  6. 21:01Debug the Linux kernel?!
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.