ANDROID: Export the necessary symbols for the implementation of the BPF scheduler.
It's fortunate that we enabled SCHED_CLASS_EXT in the Android 16-6.12 GKI version. Thank you very much! In the original version, we submitted several vendor hooks to synchronize the state of the sched_ext scheduler (to avoid breaking KMI when enabling the CONFIG_SCHED_CLASS_EXT option in the OEM-GKI version). Fortunately, the current GKI version has agreed to enable the CONFIG_SCHED_CLASS_EXT option, so directly exporting these two symbols is a more common approach (some MTK-related code will also require this). In the current GKI version, we need to export the following symbols: register_btf_kfunc_id_set: This function is used to register the BPF kfunc with the BPF subsystem. The kernel has already exported this function, and we need to add it to the OPlus symbol table and invoke it in ddk modules. __scx_ops_enabled && __scx_switched_all:Status flags for the sched_ext scheduler Bug: 417106548 Change-Id: I5161285b4fedf55bc7ee168f948f731160c17d73 Signed-off-by: Yuxing Wang <wangyuxing@oppo.com>
This commit is contained in:
committed by
Treehugger Robot
parent
de6714dc48
commit
55ac0abda4
@@ -860,6 +860,7 @@ static LIST_HEAD(scx_tasks);
|
||||
static struct kthread_worker *scx_ops_helper;
|
||||
static DEFINE_MUTEX(scx_ops_enable_mutex);
|
||||
DEFINE_STATIC_KEY_FALSE(__scx_ops_enabled);
|
||||
EXPORT_SYMBOL_GPL(__scx_ops_enabled);
|
||||
DEFINE_STATIC_PERCPU_RWSEM(scx_fork_rwsem);
|
||||
static atomic_t scx_ops_enable_state_var = ATOMIC_INIT(SCX_OPS_DISABLED);
|
||||
static int scx_ops_bypass_depth;
|
||||
@@ -867,7 +868,7 @@ static DEFINE_RAW_SPINLOCK(__scx_ops_bypass_lock);
|
||||
static bool scx_ops_init_task_enabled;
|
||||
static bool scx_switching_all;
|
||||
DEFINE_STATIC_KEY_FALSE(__scx_switched_all);
|
||||
|
||||
EXPORT_SYMBOL_GPL(__scx_switched_all);
|
||||
static struct sched_ext_ops scx_ops;
|
||||
static bool scx_warned_zero_slice;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user