Conversation
|
r? @ChrisDenton (rust-highfive has picked a reviewer for you, use r? to override) |
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
ChrisDenton
left a comment
There was a problem hiding this comment.
This approach seems reasonable to me. I just have a few tiny nits but nothing major.
|
@ChrisDenton Should I clean up the CI changes now? They obviously cannot be merged. |
|
Yes please. Could you also squish the commits? Speaking of, I notice you've moved some functions around ( |
6244ee9 to
d457801
Compare
Done 🎉 |
|
@bors r+ |
Optimize TLS on Windows This implements the suggestion in the current TLS code to embed the linked list of destructors in the `StaticKey` structure to save allocations. Additionally, locking is avoided when no destructor needs to be run. By using one Windows-provided `Once` per key instead of a global lock, locking is more finely-grained (this unblocks rust-lang#100579).
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (fa0ca78): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Footnotes |
…sDenton Avoid dropping TLS Key on sgx rust-lang#102655 reenabled dropping thread local `Key` on every platform ([library/std/src/sys_common/thread_local_key.rs](rust-lang-ci@fa0ca78#diff-5cb9acf9e243f35c975fa9fbac4885519dc104626bc03610dfa7a20bc79641ceL237-R215)). That's causing problems at least for sgx. cc: `@jethrogb` `@ChrisDenton`
fix weak memory bug in TLS on Windows We need to store the `key` *after* we register the dtor. Now I hope there isn't also some other reason why we have to actually register the dtor last... `@joboet` is there a reason you picked this particular order in rust-lang#102655? Fixes rust-lang#123583
Rollup merge of rust-lang#124281 - RalfJung:win-tls, r=joboet fix weak memory bug in TLS on Windows We need to store the `key` *after* we register the dtor. Now I hope there isn't also some other reason why we have to actually register the dtor last... `@joboet` is there a reason you picked this particular order in rust-lang#102655? Fixes rust-lang#123583
fix weak memory bug in TLS on Windows We need to store the `key` *after* we register the dtor. Now I hope there isn't also some other reason why we have to actually register the dtor last... `@joboet` is there a reason you picked this particular order in rust-lang/rust#102655? Fixes rust-lang/rust#123583
This implements the suggestion in the current TLS code to embed the linked list of destructors in the
StaticKeystructure to save allocations. Additionally, locking is avoided when no destructor needs to be run. By using one Windows-providedOnceper key instead of a global lock, locking is more finely-grained (this unblocks #100579).