tools/sched_ext: Add error logging for DSQ creation failures
Subsystems (2)
PATCH 1/1 tools/sched_ext: Add error logging for DSQ creation failures
Add scx_bpf_error() calls to scx_qmap and dequeue selftests to improve debugging when scx_bpf_create_dsq() fails.
Signed-off-by Cheng-Yang Chou <[email protected]>
--- tools/sched_ext/scx_qmap.bpf.c | 4 +++- tools/testing/selftests/sched_ext/dequeue.bpf.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-)
tools/sched_ext/scx_qmap.bpf.c +3 -1
@@ -919,8 +919,10 @@ s32 BPF_STRUCT_OPS_SLEEPABLE(qmap_init) } ret =scx_bpf_create_dsq (LOWPRI_DSQ ,-1 ); -if (ret) +if (ret) { +scx_bpf_error ("failed to create DSQ %d (%d)" ,LOWPRI_DSQ , ret);return ret; + } timer =bpf_map_lookup_elem (&monitor_timer, &key);if (!timer)
tools/testing/selftests/sched_ext/dequeue.bpf.c +3 -1
@@ -364,8 +364,10 @@ s32 BPF_STRUCT_OPS_SLEEPABLE(dequeue_init)s32 ret; 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; + }return 0 ; }
Signature · 1 line
2.48.1
Tejun Heo
reviewerQuoted 4 lines · Cheng-Yang Chou
Add
scx_bpf_error()calls toscx_qmapand dequeue selftests to improve debugging whenscx_bpf_create_dsq()fails.Signed-off-by Cheng-Yang Chou <[email protected]>
Was this actually useful to you in some way? Did you actually hit DSQ creation failure? If so, how? If not, I don't think it's a useful thing to go around and add error messages to whatever that may fail. In general, I think it'd be far more useful for everyone if the development effort is guided by some actual problems rather than just scanning the source code for trivial things.
Thanks.
Signature · 1 line
tejun