From d4a681c8a2753e3c66b55d008e7d01fb92b137ea Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Sun, 12 Jan 2025 18:23:44 -0500 Subject: [PATCH] Revert "roots: use a non-idle task for next_transid" next_transid tasks don't respect queue selection very well, because they effectively end up spinning in a loop until all other worker threads become busy. Back this out, and fix the priority handling in the Task library. This reverts commit 58db4071de5f524c35b1362bfb5b1fceedea503f. --- src/bees-roots.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bees-roots.cc b/src/bees-roots.cc index 6c470e9..15a6ce8 100644 --- a/src/bees-roots.cc +++ b/src/bees-roots.cc @@ -131,7 +131,7 @@ BeesScanMode::start_scan() st->scan(); }); } - m_scan_task.run(); + m_scan_task.idle(); } bool @@ -769,7 +769,7 @@ BeesScanModeExtent::scan() // Good to go, start everything running for (const auto &i : task_map_copy) { - i.second.run(); + i.second.idle(); } } @@ -902,7 +902,7 @@ BeesScanModeExtent::map_next_extent(uint64_t const subvol) << " time " << crawl_time << " subvol " << subvol); } - // We did something! Get in line to run again (but don't preempt work already queued) + // We did something! Get in line to run again Task::current_task().idle(); return; }