RFR: Loom preempt3 [v5]

Coleen Phillimore coleenp at openjdk.java.net
Thu Jun 24 17:25:12 UTC 2021


> This is my cleaned up version of preemption where one thread suspends another, walks the stack and allocates the frozen frame. There are some asserts to verify this preempt situation and the jump in handle_special_runtime_exit_condition might need to be moved somewhere safer.  Robbin wasn't happy with the fact that while suspended, another thread can handshake this thread and modify the stack, even though the loom code doesn't do that.  I think this is better for now though and hasn't significantly changed in a while, so I'd like to check this in for now.

Coleen Phillimore has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains seven commits:

 - Or should the StackWatermarkSet::after_unwind go here?
 - Shouldn't call update_poll_values on suspended thread, but I suppose we need to call StackWaterMark::after_unwind (actually no idea maybe that should be in the special_exit function instead.
 - Better handling boolean for preempt
 - Make preempt a bool in ContMirror instead of holding the current thread.
 - Fix some asserts, add another.
 - Preempt changes to use block_suspend (+whitespace changes)
 - Add thread specific suspension mechanism

-------------

Changes: https://git.openjdk.java.net/loom/pull/48/files
 Webrev: https://webrevs.openjdk.java.net/?repo=loom&pr=48&range=04
  Stats: 410 lines in 7 files changed: 276 ins; 53 del; 81 mod
  Patch: https://git.openjdk.java.net/loom/pull/48.diff
  Fetch: git fetch https://git.openjdk.java.net/loom pull/48/head:pull/48

PR: https://git.openjdk.java.net/loom/pull/48


More information about the loom-dev mailing list