]> git.hungrycats.org Git - bees/commitdiff
Revert "roots: use a non-idle task for next_transid"
authorZygo Blaxell <bees@furryterror.org>
Sun, 12 Jan 2025 23:23:44 +0000 (18:23 -0500)
committerZygo Blaxell <bees@furryterror.org>
Sun, 12 Jan 2025 23:48:33 +0000 (18:48 -0500)
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

index 6c470e9b07b72309273c451a0477ba959e41b05a..15a6ce8f53afa56037dad35a43b12ee3a161a71e 100644 (file)
@@ -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;
        }