mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 02:44:41 +01:00
sched_ext: Add error logging for dsq creation failures
Add scx_bpf_error() calls when scx_bpf_create_dsq() fails in multiple schedulers to improve debuggability: - scx_central.bpf.c: central_init() - scx_flatcg.bpf.c: fcg_cgroup_init() and fcg_init() - scx_qmap.bpf.c: qmap_init() Signed-off-by: George Guo <guodongtai@kylinos.cn> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
714d81423e
commit
2f8d489897
3 changed files with 12 additions and 4 deletions
|
|
@ -301,8 +301,10 @@ int BPF_STRUCT_OPS_SLEEPABLE(central_init)
|
|||
int ret;
|
||||
|
||||
ret = scx_bpf_create_dsq(FALLBACK_DSQ_ID, -1);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
scx_bpf_error("scx_bpf_create_dsq failed (%d)", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
timer = bpf_map_lookup_elem(¢ral_timer, &key);
|
||||
if (!timer)
|
||||
|
|
|
|||
|
|
@ -842,8 +842,10 @@ int BPF_STRUCT_OPS_SLEEPABLE(fcg_cgroup_init, struct cgroup *cgrp,
|
|||
* unlikely case that it breaks.
|
||||
*/
|
||||
ret = scx_bpf_create_dsq(cgid, -1);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
scx_bpf_error("scx_bpf_create_dsq failed (%d)", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
cgc = bpf_cgrp_storage_get(&cgrp_ctx, cgrp, 0,
|
||||
BPF_LOCAL_STORAGE_GET_F_CREATE);
|
||||
|
|
|
|||
|
|
@ -866,12 +866,16 @@ s32 BPF_STRUCT_OPS_SLEEPABLE(qmap_init)
|
|||
print_cpus();
|
||||
|
||||
ret = scx_bpf_create_dsq(SHARED_DSQ, -1);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
scx_bpf_error("failed to create DSQ %d (%d)", SHARED_DSQ, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = scx_bpf_create_dsq(HIGHPRI_DSQ, -1);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
scx_bpf_error("failed to create DSQ %d (%d)", HIGHPRI_DSQ, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
timer = bpf_map_lookup_elem(&monitor_timer, &key);
|
||||
if (!timer)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue