Skip to content
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

Introduce TBB to refactor task runners #1323

Merged
merged 10 commits into from
Mar 17, 2023

Conversation

PragmaTwice
Copy link
Member

@PragmaTwice PragmaTwice commented Mar 16, 2023

We refactor the TaskRunner class using blocking queues (tbb::concurrent_bounded_queue) in oneTBB (https://github.com/oneapi-src/oneTBB).

oneTBB provides more utilities about threads which can be used in kvrocks, like spin locks, rw mutex (more efficient), concurrent map, set, vector, and queue, concurrent algorithms, task arena, task scheduler (which has some difference than task runners), and task graphs.

@@ -35,7 +35,7 @@ concurrency:
jobs:
check-and-lint:
name: Lint and check code
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
Copy link
Member Author

@PragmaTwice PragmaTwice Mar 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need newer clang-tidy (version 12 -> 14) so that a bug (false report) in the old version (clang-tidy 12) will be fixed, and does not fail the CI.

Copy link
Member

@git-hulk git-hulk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@caipengbo
Copy link
Contributor

Do we plan to optimize more places with TBB in the future?

@PragmaTwice
Copy link
Member Author

Do we plan to optimize more places with TBB in the future?

Sure.

@PragmaTwice
Copy link
Member Author

Merging...

@PragmaTwice PragmaTwice merged commit 211beb5 into apache:unstable Mar 17, 2023
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.

3 participants