Skip to content

Draft: Remove old TBB components

Discussed in #173 (closed)

This MR removes older TBB components, already marked in !982 (merged)

Removing them reveals a change in behaviour - the TBB scheduler cannot now be made to use a specific number of threads, and will limit itself to the number of physical cores on the machine (you can limit this further, but not oversubscribe).

Attempting to oversubscribe then leads to a stall at the finalisation barrier in ThreadPoolSvc. This MR fixes the stall by using task_scheduler_observer to count the number of threads used.

Note that this MR is not a migration from the tbb::task API - !1067 (merged) does that.

This MR presupposes that thread finalisation is necessary, but I am not convinced that it is used anywhere.

This MR assumes that if the TBB scheduler creates N threads, and so we launch N finalisation tasks, the tasks will run in the existing TBB threads. Perhaps this was also an assumption before, but it might be slightly weaker now.

Finally, this change in TBB behaviour implies that performance measurements when oversubscribing CPU threads will now be meaningless.

Edited by Benjamin Michael Wynne

Merge request reports