-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
runtime: add async preemption support to the riscv port #36711
Comments
@aclements, item for #36365 ? |
It has been a month since this issue was reported. Is there any work in progress? I am new here but I have experience tracing/tweaking RISC-V context handling in Linux kernel. Now PPC64 and MIPS* async-preemption support are fine references, so I'll start from their ports. Any other hints are welcomed. |
Basically The infinite loop can be successfully preempted and thus release the main goroutine, but when it reached the end of this test case, the The other issue is choosing which register to be clobbered. I expect to send this patch in a few weeks, hopefully not months. |
I'm not sure LR is a good choice. For frameless leaf functions LR is live throughout the entire function. We don't want the whole function be non-preemptible. On the other hand, the TMP register is only live across sequences of a small number of instructions. It is used for synthesize large offsets, etc. In particular, it won't make an entire loop non-preemptible. It looks to me the usage of REGTMP on RISCV is pretty much the same as on MIPS or ARM64. (Note that we only care code generated by the Go compiler, not assembly code.) |
Change https://golang.org/cl/226206 mentions this issue: |
The Go riscv64 port does not currently support async preemption - this should be added.
The text was updated successfully, but these errors were encountered: