Lines Matching refs:cpuc
368 struct cpu_ctx *cpuc;
394 if (!(cpuc = bpf_map_lookup_elem(&cpu_ctx_stor, &zero))) {
401 if (!cpuc->dsp_cnt) {
402 cpuc->dsp_idx = (cpuc->dsp_idx + 1) % 5;
403 cpuc->dsp_cnt = 1 << cpuc->dsp_idx;
406 fifo = bpf_map_lookup_elem(&queue_arr, &cpuc->dsp_idx);
408 scx_bpf_error("failed to find ring %llu", cpuc->dsp_idx);
438 cpuc->dsp_cnt--;
445 if (!cpuc->dsp_cnt)
449 cpuc->dsp_cnt = 0;
470 struct cpu_ctx *cpuc;
474 if (!(cpuc = bpf_map_lookup_elem(&cpu_ctx_stor, &zero))) {
484 cpuc->avg_weight = cpuc->avg_weight * 3 / 4 + p->scx.weight / 4;
485 idx = weight_to_idx(cpuc->avg_weight);
486 cpuc->cpuperf_target = qidx_to_cpuperf_target[idx];
488 scx_bpf_cpuperf_set(scx_bpf_task_cpu(p), cpuc->cpuperf_target);
593 struct cpu_ctx *cpuc;
597 if (!(cpuc = bpf_map_lookup_percpu_elem(&cpu_ctx_stor, &zero, cpu)))
601 cpuc->dsp_idx, cpuc->dsp_cnt, cpuc->avg_weight,
602 cpuc->cpuperf_target);
698 struct cpu_ctx *cpuc;
720 if (!(cpuc = bpf_map_lookup_percpu_elem(&cpu_ctx_stor, &zero, i))) {
726 cur = cpuc->cpuperf_target;