Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

George Guo and committed by
Tejun Heo
2f8d4898 714d8142

+12 -4
+3 -1
tools/sched_ext/scx_central.bpf.c
··· 301 301 int ret; 302 302 303 303 ret = scx_bpf_create_dsq(FALLBACK_DSQ_ID, -1); 304 - if (ret) 304 + if (ret) { 305 + scx_bpf_error("scx_bpf_create_dsq failed (%d)", ret); 305 306 return ret; 307 + } 306 308 307 309 timer = bpf_map_lookup_elem(&central_timer, &key); 308 310 if (!timer)
+3 -1
tools/sched_ext/scx_flatcg.bpf.c
··· 842 842 * unlikely case that it breaks. 843 843 */ 844 844 ret = scx_bpf_create_dsq(cgid, -1); 845 - if (ret) 845 + if (ret) { 846 + scx_bpf_error("scx_bpf_create_dsq failed (%d)", ret); 846 847 return ret; 848 + } 847 849 848 850 cgc = bpf_cgrp_storage_get(&cgrp_ctx, cgrp, 0, 849 851 BPF_LOCAL_STORAGE_GET_F_CREATE);
+6 -2
tools/sched_ext/scx_qmap.bpf.c
··· 866 866 print_cpus(); 867 867 868 868 ret = scx_bpf_create_dsq(SHARED_DSQ, -1); 869 - if (ret) 869 + if (ret) { 870 + scx_bpf_error("failed to create DSQ %d (%d)", SHARED_DSQ, ret); 870 871 return ret; 872 + } 871 873 872 874 ret = scx_bpf_create_dsq(HIGHPRI_DSQ, -1); 873 - if (ret) 875 + if (ret) { 876 + scx_bpf_error("failed to create DSQ %d (%d)", HIGHPRI_DSQ, ret); 874 877 return ret; 878 + } 875 879 876 880 timer = bpf_map_lookup_elem(&monitor_timer, &key); 877 881 if (!timer)