Skip to content

Streamline the test for reserving slots in constrained arena#2016

Draft
aleksei-fedotov wants to merge 2 commits intomasterfrom
fix-create_numa_task_arenas-test
Draft

Streamline the test for reserving slots in constrained arena#2016
aleksei-fedotov wants to merge 2 commits intomasterfrom
fix-create_numa_task_arenas-test

Conversation

@aleksei-fedotov
Copy link
Contributor

@aleksei-fedotov aleksei-fedotov commented Mar 17, 2026

The test is a bit confusing because of the various conditions here and there to which the test tries to adapt. This change is an attempt to simplify the test in terms of readability and comprehension.

int max_num_external_threads = std::min(ta_concurrency, reserved_slots);
int num_tasks = ta_concurrency - int(workers_cannot_fully_occupy_arena);
const int max_num_external_threads = actual_reserved_slots;
const int num_tasks = ta_concurrency; // One task per each arena slot
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't cgroups prevent the extra thread when actual_reserved_slots is 0?

Suggested change
const int num_tasks = ta_concurrency; // One task per each arena slot
const int num_tasks = max_num_workers + max_num_external_threads; // One task per each arena slot

Base automatically changed from dev/dnmokhov/create_numa_task_arenas to master March 19, 2026 08:43
@aleksei-fedotov aleksei-fedotov marked this pull request as draft March 20, 2026 15:02
@aleksei-fedotov aleksei-fedotov force-pushed the fix-create_numa_task_arenas-test branch from 7ef0553 to ce658c1 Compare March 20, 2026 15:02
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