An atomic operation can be optimized? #2940
-
When I perf a program based on Tokio threaded scheduler on ARM64 Linux, I found this atomic operation consumes a lot of time: tokio/tokio/src/runtime/thread_pool/idle.rs Line 136 in 2e05399 It can be optimized to an atomic load, which prevents cache invalidation on other cores: let state = State(self.state.load(SeqCst)); After that the overhead of And I'm not sure if it is safe to relax the memory consistency from Is that reasonable? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
That fetch_add is there intentionally: #1788 |
Beta Was this translation helpful? Give feedback.
That fetch_add is there intentionally: #1788