Merge pull request #883 from vax-r/rusty_taskslen

scx_rusty: Restore push domain tasks when no task found
This commit is contained in:
Daniel Hodges 2024-11-05 12:26:42 +00:00 committed by GitHub
commit 0f29854e51
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -759,8 +759,8 @@ impl<'a, 'b> LoadBalancer<'a, 'b> {
.into_iter()
.filter(|task| {
task.dom_mask & (1 << pull_dom_id) != 0
|| !(self.skip_kworkers && task.is_kworker)
|| !task.migrated.get()
&& !(self.skip_kworkers && task.is_kworker)
&& !task.migrated.get()
})
.collect();
@ -779,7 +779,10 @@ impl<'a, 'b> LoadBalancer<'a, 'b> {
.filter(|x| x.load >= OrderedFloat(to_xfer) && task_filter(x, pull_dom_id)),
),
) {
(None, None) => return Ok(None),
(None, None) => {
std::mem::swap(&mut push_dom.tasks, &mut SortedVec::from_unsorted(tasks));
return Ok(None);
}
(Some(task), None) | (None, Some(task)) => (task, calc_new_imbal(*task.load)),
(Some(task0), Some(task1)) => {
let (new_imbal0, new_imbal1) =