mirror of
				https://github.com/Zygo/bees.git
				synced 2025-11-04 04:00:36 +01:00 
			
		
		
		
	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 58db4071de.
			
			
This commit is contained in:
		@@ -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;
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user