mirror of
https://github.com/sched-ext/scx.git
synced 2024-11-25 04:00:24 +00:00
Revert "scx_rusty: Refactor ridx assignment in populate_tasks_by_load"
This commit is contained in:
parent
41d60aef04
commit
fe3ce64a9b
@ -686,7 +686,9 @@ impl<'a, 'b> LoadBalancer<'a, 'b> {
|
|||||||
let mut pids = vec![];
|
let mut pids = vec![];
|
||||||
|
|
||||||
let (mut ridx, widx) = (active_pids.read_idx, active_pids.write_idx);
|
let (mut ridx, widx) = (active_pids.read_idx, active_pids.write_idx);
|
||||||
ridx = ridx.max(widx - MAX_PIDS);
|
if widx - ridx > MAX_PIDS {
|
||||||
|
ridx = widx - MAX_PIDS;
|
||||||
|
}
|
||||||
|
|
||||||
for idx in ridx..widx {
|
for idx in ridx..widx {
|
||||||
let pid = active_pids.pids[(idx % MAX_PIDS) as usize];
|
let pid = active_pids.pids[(idx % MAX_PIDS) as usize];
|
||||||
|
Loading…
Reference in New Issue
Block a user