diff options
author | Hongyan Xia <hongyan.xia2@arm.com> | 2024-07-08 15:01:18 +0100 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2024-07-08 07:10:48 -1000 |
commit | 6203ef73fa5c0358f7960b038628259be1448724 (patch) | |
tree | c3a4bd42433f3166848f19ff0d15744b669a68a0 /tools/sched_ext/include | |
parent | 7b9f6c864a3429ef086998a3d2b04e93fee7d051 (diff) |
sched/ext: Add BPF function to fetch rq
rq contains many useful fields to implement a custom scheduler. For
example, various clock signals like clock_task and clock_pelt can be
used to track load. It also contains stats in other sched_classes, which
are useful to drive scheduling decisions in ext.
tj: Put the new helper below scx_bpf_task_*() helpers.
Signed-off-by: Hongyan Xia <hongyan.xia2@arm.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'tools/sched_ext/include')
-rw-r--r-- | tools/sched_ext/include/scx/common.bpf.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/sched_ext/include/scx/common.bpf.h b/tools/sched_ext/include/scx/common.bpf.h index dbbda0e35c5d..965d20324114 100644 --- a/tools/sched_ext/include/scx/common.bpf.h +++ b/tools/sched_ext/include/scx/common.bpf.h @@ -57,6 +57,7 @@ s32 scx_bpf_pick_idle_cpu(const cpumask_t *cpus_allowed, u64 flags) __ksym; s32 scx_bpf_pick_any_cpu(const cpumask_t *cpus_allowed, u64 flags) __ksym; bool scx_bpf_task_running(const struct task_struct *p) __ksym; s32 scx_bpf_task_cpu(const struct task_struct *p) __ksym; +struct rq *scx_bpf_cpu_rq(s32 cpu) __ksym; static inline __attribute__((format(printf, 1, 2))) void ___scx_bpf_bstr_format_checker(const char *fmt, ...) {} |