projects/linux·blob master · refs

31 lines · 964 B

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 <[email protected]>
7 * Copyright (c) 2022 David Vernet <[email protected]>
8 * Copyright (c) 2024 Andrea Righi <[email protected]>
9 */
10#ifndef _KERNEL_SCHED_EXT_IDLE_H
11#define _KERNEL_SCHED_EXT_IDLE_H
12
13#include <linux/btf_ids.h>
14
15struct cpumask;
16struct sched_ext_ops;
17struct task_struct;
18
19extern struct btf_id_set8 scx_kfunc_ids_idle;
20extern struct btf_id_set8 scx_kfunc_ids_select_cpu;
21
22void scx_idle_update_selcpu_topology(struct sched_ext_ops *ops);
23void scx_idle_init_masks(void);
24
25s32 scx_select_cpu_dfl(struct task_struct *p, s32 prev_cpu, u64 wake_flags,
26 const struct cpumask *cpus_allowed, u64 flags);
27void scx_idle_enable(struct sched_ext_ops *ops);
28void scx_idle_disable(void);
29int scx_idle_init(void);
30
31#endif /* _KERNEL_SCHED_EXT_IDLE_H */