Skip to content

spawn through local queue if possible#29

Open
sticnarf wants to merge 6 commits intotikv:masterfrom
sticnarf:prefer-spawn-local
Open

spawn through local queue if possible#29
sticnarf wants to merge 6 commits intotikv:masterfrom
sticnarf:prefer-spawn-local

Conversation

@sticnarf
Copy link
Contributor

@sticnarf sticnarf commented Jan 8, 2020

In this PR, if spawn happens in tne working threads, tasks are pushed into the local queue for locality. It also removes the local wake mechanism of futures. Remote is renamed to Handle for its new meaning.

Benchmark shows up to 100% improvement on chain_spawn.
But there is a regression on ping_pong when ping_count is large. This is because it is much more expensive to increase the capacity of crossbeam Worker (allocating new buffer and copying all) than Injector (just adding a new block).

Signed-off-by: Yilin Chen <sticnarf@gmail.com>
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants