Re: [PATCH] sched_ext: allow ops.cgroup_set_bandwidth() to be sleepable
Changwoo Min <[email protected]>
| Newsgroups | dev.linux.lists.sched-ext,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Hello,
On 8/18/26 2:53 AM, Tejun Heo wrote:
> Hello,
>
> On Tue, Aug 18, 2026 at 02:09:41AM +0900, Changwoo Min wrote:
>> +/*
>> + * Capability marker for userspace. The sleepable allowance for
>> + * ops.cgroup_set_bandwidth() (see bpf_scx_check_member()) is a verifier
>> + * property with no other symbol a scheduler can probe, so this no-op function
>> + * exists solely so its presence in the kernel's BTF can be detected. It has no
>> + * callers; __used keeps it from being optimized away.
>> + */
>> +__used void scx_cgroup_set_bandwidth_may_sleep(void) {}
>
> __used only prevents the compiler from dropping the function. With
> CONFIG_LD_DEAD_CODE_DATA_ELIMINATION, the linker can still garbage
> collect its section, so please add __retain too (cf. __bpf_kfunc).
>
> Also, we'll likely accumulate more of these markers over time, so let's
> give them a shared prefix - scx_compat_marker_ or something like that -
> and collect them in one place, maybe towards the end of ext.c next to
> the module init code.
Thanks for the comments. I will address these two and send v2 shortly.
Regarding the sashiko review, I think that needs to be addressed
separately.
Regards,
Changwoo Min