Closed brson closed 10 years ago
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 #[thread_local]
I think there is likely very little perf left to be gained here, if any. This bug is obsolete.
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.