Lines Matching refs:cpu
18 validate_idle_cpu(const struct task_struct *p, const struct cpumask *allowed, s32 cpu) in validate_idle_cpu() argument
20 if (scx_bpf_test_and_clear_cpu_idle(cpu)) in validate_idle_cpu()
21 scx_bpf_error("CPU %d should be marked as busy", cpu); in validate_idle_cpu()
24 !bpf_cpumask_test_cpu(cpu, allowed)) in validate_idle_cpu()
26 cpu, p->pid, p->comm); in validate_idle_cpu()
33 s32 cpu; in BPF_STRUCT_OPS() local
44 cpu = scx_bpf_select_cpu_and(p, prev_cpu, wake_flags, allowed, 0); in BPF_STRUCT_OPS()
45 if (cpu >= 0) { in BPF_STRUCT_OPS()
46 validate_idle_cpu(p, allowed, cpu); in BPF_STRUCT_OPS()
49 return cpu; in BPF_STRUCT_OPS()
58 s32 prev_cpu = scx_bpf_task_cpu(p), cpu; in BPF_STRUCT_OPS() local
72 cpu = scx_bpf_select_cpu_and(p, prev_cpu, 0, allowed, 0); in BPF_STRUCT_OPS()
73 if (cpu >= 0) { in BPF_STRUCT_OPS()
74 validate_idle_cpu(p, allowed, cpu); in BPF_STRUCT_OPS()
75 scx_bpf_kick_cpu(cpu, SCX_KICK_IDLE); in BPF_STRUCT_OPS()
122 int cpu; in select_cpu_from_user() local
129 cpu = scx_bpf_select_cpu_and(p, bpf_get_smp_processor_id(), 0, p->cpus_ptr, 0); in select_cpu_from_user()
134 return cpu; in select_cpu_from_user()