Re: [PATCH sched_ext/for-7.4] sched_ext: Work around pahole 1.32 dropping scx_bpf_task_set_lazy_resched() from BTF

From: Tejun Heo

Date: Tue Sep 29 2026 - 15:27:45 EST


On Tue, Sep 29, 2026 at 09:19:50PM +0200, Andrea Righi wrote:
> First of all thanks for figuring this out, it was really annoying, I've been
> holding pahole to 1.31 because of this.
>
> I also looked a bit and it seems to be triggered specifically by the bool type.
> This is with clang 22.1.8 on x86_64 without barrier_data and only changing the
> type:
>
> bool movl %esi, %ebp -> dropped by pahole
> u32 movl %esi, %ebp -> ok
> u64 movq %rsi, %r15 -> ok
>
> With u32 the generated code is identical to the bool case, but clang keeps the
> RSI entry range, so pahole is happy.
>
> Should we just change lazy to u32 (or use a u64 flags) instead of using
> barrier_data()?

I mean, bool is the right and I'm hoping clang can be fixed and the
workaround seems to work, so keep it as-is unless there are other reasons to
change it (e.g. this becomes a wider interface taking u64 flags or sth like
that)?

Thanks.

--
tejun