Re: [PATCH v2 sched_ext/for-7.1-fixes] tools/sched_ext: scx_qmap: Silence task_ctx lookup miss
From: Zhao Mengmeng
Date: Tue Apr 21 2026 - 04:41:53 EST
On Mon, 20 Apr 2026 21:17:11 -1000, Tejun Heo <tj@xxxxxxxxxx> wrote:
> diff --git a/tools/sched_ext/scx_qmap.bpf.c b/tools/sched_ext/scx_qmap.bpf.c
> index b68abb9e760b..aad698fe294b 100644
> --- a/tools/sched_ext/scx_qmap.bpf.c
> +++ b/tools/sched_ext/scx_qmap.bpf.c
> @@ -584,10 +574,8 @@ static s64 task_qdist(struct task_struct *p)
> s64 qdist;
>
> tctx = bpf_task_storage_get(&task_ctx_stor, p, 0, 0);
> - if (!tctx) {
> - scx_bpf_error("task_ctx lookup failed");
> + if (!tctx)
> return 0;
> - }
>
> qdist = tctx->core_sched_seq - core_sched_head_seqs[idx];
>
Hi Tejun,
I met this error also on the lastest for-next branch, trying to prepare a
fix and find your patch. Looks good to me.
Reviewed-by: Zhao Mengmeng <zhaomengmeng@xxxxxxxxxx>
--
Zhao Mengmeng <zhaomengmeng@xxxxxxxxxx>