Skip to content

reactor: Use std::deque as the task queue container - #323

Merged
StephanDollberg merged 1 commit into
v26.3.xfrom
stephan/chunked-taskqueue
Oct 29, 2026
Merged

StephanDollberg merged 1 commit into
v26.3.xfrom
stephan/chunked-taskqueue

Conversation

@StephanDollberg

Copy link
Copy Markdown
Member

Avoid oversized allocs on task bursts.

chunked_fifo is not usable as is as it doesn't support front insertion
as is needed for urgent tasks.

Avoid oversized allocs on task bursts.

chunked_fifo is not usable as is as it doesn't support front insertion
as is needed for urgent tasks.
Copilot AI balanced review requested due to automatic review settings October 28, 2026 11:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are recorded for the task queue’s switch to std::deque.

No open issues 🎉

What changed in this PR

Switches the reactor task queue from circular_buffer to std::deque to avoid oversized allocations during task bursts while preserving front insertion for urgent tasks.

Changes:

  • Adds <deque> and changes the task queue container type.
  • Updates both shuffle helper signatures to accept the new container.
File Description
src/​core/​reactor.cc Adapts shuffle helpers to std::deque<task*>.
include/​seastar/​core/​reactor.hh Includes <deque> and changes the task queue storage type.

Review effort: Balanced

@travisdowns

travisdowns commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

xref: scylladb#3138

That change hasn't been able to make it in, but this PR seems pretty much strictly better than the status quo while being less controversial than 3138.

@travisdowns

Copy link
Copy Markdown
Member

LGTM, lets do a microbench slash on the RP side.

@StephanDollberg
StephanDollberg merged commit ce8497e into v26.3.x Oct 29, 2026
32 checks passed
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