mirror of
https://github.com/JakeHillion/scx.git
synced 2024-11-25 19:10:23 +00:00
[layered] Implement reverse weight DSQ algorithm
This commit is contained in:
parent
9f60053312
commit
8c8250b1e2
@ -142,9 +142,13 @@ static __noinline u32 iter_layer_dsq_ctx(int idx, u32 layer_idx)
|
||||
return ret;
|
||||
}
|
||||
case DSQ_ITER_REVERSE_WEIGHT: {
|
||||
// TODO: Correctly implement this algo, see:
|
||||
// https://github.com/sched-ext/scx/issues/738
|
||||
return dsq_iter_weight_ctx(idx);
|
||||
u32 ret;
|
||||
ret = dsq_iter_weight_ctx(nr_layers - 1 - idx);
|
||||
if (ret >= nr_layers) {
|
||||
scx_bpf_error("can't happen");
|
||||
return ret;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
default:
|
||||
scx_bpf_error("unknown dsq iter algo");
|
||||
|
Loading…
Reference in New Issue
Block a user