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

Closed
brson opened this Issue Feb 10, 2012 · 7 comments

Comments

Projects
None yet
4 participants
@brson
Contributor

brson commented Feb 10, 2012

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.

@ghost ghost assigned brson Feb 10, 2012

@brson

This comment has been minimized.

Show comment
Hide comment
@brson

brson Feb 16, 2012

Contributor

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).

Contributor

brson commented Feb 16, 2012

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).

@brson

This comment has been minimized.

Show comment
Hide comment
@brson

brson Feb 16, 2012

Contributor

So my first attempt at this resulted in a 2s regression, possibly because of the above issue.

Contributor

brson commented Feb 16, 2012

So my first attempt at this resulted in a 2s regression, possibly because of the above issue.

@bstrie

This comment has been minimized.

Show comment
Hide comment
@bstrie

bstrie Jul 2, 2013

Contributor

@brson, is this still relevant with the new scheduler work?

Contributor

bstrie commented Jul 2, 2013

@brson, is this still relevant with the new scheduler work?

@cmr

This comment has been minimized.

Show comment
Hide comment
@cmr

cmr Aug 29, 2013

Member

@brson given that growable etc stacks are changing/gone, is this issue still relevant at all?

Member

cmr commented Aug 29, 2013

@brson given that growable etc stacks are changing/gone, is this issue still relevant at all?

@catamorphism

This comment has been minimized.

Show comment
Hide comment
@catamorphism

catamorphism Oct 24, 2013

Contributor

Low priority, not 1.0

Contributor

catamorphism commented Oct 24, 2013

Low priority, not 1.0

@brson

This comment has been minimized.

Show comment
Hide comment
@brson

brson Jan 16, 2014

Contributor

@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.

Contributor

brson commented Jan 16, 2014

@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.

@brson

This comment has been minimized.

Show comment
Hide comment
@brson

brson Apr 17, 2014

Contributor

With #[thread_local] I think there is likely very little perf left to be gained here, if any. This bug is obsolete.

Contributor

brson commented Apr 17, 2014

With #[thread_local] I think there is likely very little perf left to be gained here, if any. This bug is obsolete.

@brson brson closed this Apr 17, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment