1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2021 Oplus. All rights reserved.
*/
#ifndef _TASK_SCHED_INFO_H
#define _TASK_SCHED_INFO_H
#include <linux/cpufreq.h>
#define sched_err(fmt, ...) \
printk(KERN_ERR "[SCHED_INFO_ERR][%s]"fmt, __func__, ##__VA_ARGS__)
enum {
task_sched_info_running = 0,
task_sched_info_runnable,
task_sched_info_IO,
task_sched_info_D,
task_sched_info_S,
task_sched_info_freq,
task_sched_info_freq_limit,
task_sched_info_isolate,
task_sched_info_backtrace,
};
enum {
other_runnable = 1,
running_runnable,
};
enum {
cpu_unisolate = 0,
cpu_isolate,
};
struct task_sched_info {
u64 sched_info_one;
u64 sched_info_two;
};
extern void update_task_sched_info(struct task_struct *p, u64 delay, int type, int cpu);
extern void update_freq_info(struct cpufreq_policy *policy);
extern void update_freq_limit_info(struct cpufreq_policy *policy);
extern void update_cpu_isolate_info(int cpu, u64 type);
extern void update_wake_tid(struct task_struct *p, struct task_struct *cur, unsigned int type);
extern void update_running_start_time(struct task_struct *prev, struct task_struct *next);
extern void sched_action_trig(void);
extern void get_target_thread_pid(struct task_struct *p);
extern bool ctp_send_message;
#endif /* _TASK_SCHED_INFO_H */
|