mirror of
https://github.com/sched-ext/scx.git
synced 2024-11-25 12:10:24 +00:00
Merge pull request #107 from dschatzberg/fix_affn_viol
scx_layered: Fix AFFN_VIOL stat bump
This commit is contained in:
commit
4eb2367048
@ -404,9 +404,9 @@ s32 BPF_STRUCT_OPS(layered_select_cpu, struct task_struct *p, s32 prev_cpu, u64
|
||||
/* not much to do if bound to a single CPU */
|
||||
if (p->nr_cpus_allowed == 1) {
|
||||
cpu = prev_cpu;
|
||||
if (!bpf_cpumask_test_cpu(cpu, layer_cpumask))
|
||||
lstat_inc(LSTAT_AFFN_VIOL, layer, cctx);
|
||||
if (scx_bpf_test_and_clear_cpu_idle(prev_cpu)) {
|
||||
if (!bpf_cpumask_test_cpu(cpu, layer_cpumask))
|
||||
lstat_inc(LSTAT_AFFN_VIOL, layer, cctx);
|
||||
goto dispatch_local;
|
||||
} else {
|
||||
goto out_put_cpumasks;
|
||||
|
Loading…
Reference in New Issue
Block a user