Commit 53bdd5e8 authored by Guan Jing's avatar Guan Jing Committed by Lu Jialin
Browse files

sched: introduce bpf_sched_enable()

maillist inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I8OIT1

Reference: https://lore.kernel.org/all/20210916162451.709260-1-guro@fb.com/



-------------------

Introduce a dedicated static key and the bpf_sched_enabled() wrapper
to guard all invocations of bpf programs in the scheduler code.

It will help to avoid any potential performance regression in a case
when no scheduler bpf programs are attached.

Signed-off-by: default avatarRoman Gushchin <guro@fb.com>
Signed-off-by: default avatarChen Hui <judy.chenhui@huawei.com>
Signed-off-by: default avatarRen Zhijie <renzhijie2@huawei.com>
Signed-off-by: default avatarHui Tang <tanghui20@huawei.com>
Signed-off-by: default avatarGuan Jing <guanjing6@huawei.com>
parent 82c25c3e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment