Commit d2d3b8e6 authored by Roman Gushchin's avatar Roman Gushchin Committed by Ma Wupeng
Browse files

bpf: sched: introduce bpf_sched_enable()

maillist inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I5F6X6
CVE: NA

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>
parent b3499578
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment