-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Store the task pointer on the Rust stack segment, not in TLS #1804
Comments
The current situation with upcall_call_shim_on_c_stack turning off the stack boundary (#1226) makes this optimization much less useful than it could be (basically, it will work for upcalls, but builtins will pay a penalty for failing to find the stack boundary). |
So my first attempt at this resulted in a 2s regression, possibly because of the above issue. |
@brson, is this still relevant with the new scheduler work? |
@brson given that growable etc stacks are changing/gone, is this issue still relevant at all? |
Low priority, not 1.0 |
@cmr it is. It would still be faster than using TLS generally to do this. I no longer think this is the right way to do it since it would be very vulnerable to stack smashing attacks. Instead I'd rather just commandeer another TCB slot for the task pointer. |
With |
* update rust toolchain to nightly 1.66.0-nightly * move to code block instead of escaping * fix missing quote * disable clippy check: clippy::uninlined-format-args Co-authored-by: rahulku <luhark@a07817b4397e.ant.amazon.com>
We should be able to get the task pointer faster by storing it on the current stack segment instead of looking it up in TLS.
The text was updated successfully, but these errors were encountered: