xref: /linux/kernel/sched/ext_idle.h (revision aec2f682d47c54ef434b2d440992626d80b1ebdc)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * BPF extensible scheduler class: Documentation/scheduler/sched-ext.rst
4  *
5  * Copyright (c) 2022 Meta Platforms, Inc. and affiliates.
6  * Copyright (c) 2022 Tejun Heo <tj@kernel.org>
7  * Copyright (c) 2022 David Vernet <dvernet@meta.com>
8  * Copyright (c) 2024 Andrea Righi <arighi@nvidia.com>
9  */
10 #ifndef _KERNEL_SCHED_EXT_IDLE_H
11 #define _KERNEL_SCHED_EXT_IDLE_H
12 
13 struct sched_ext_ops;
14 
15 extern struct btf_id_set8 scx_kfunc_ids_select_cpu;
16 
17 void scx_idle_update_selcpu_topology(struct sched_ext_ops *ops);
18 void scx_idle_init_masks(void);
19 
20 s32 scx_select_cpu_dfl(struct task_struct *p, s32 prev_cpu, u64 wake_flags,
21 		       const struct cpumask *cpus_allowed, u64 flags);
22 void scx_idle_enable(struct sched_ext_ops *ops);
23 void scx_idle_disable(void);
24 int scx_idle_init(void);
25 
26 #endif /* _KERNEL_SCHED_EXT_IDLE_H */
27