-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathkernel_stat.h.diff
More file actions
58 lines (55 loc) · 1.32 KB
/
kernel_stat.h.diff
File metadata and controls
58 lines (55 loc) · 1.32 KB
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
53
54
55
56
57
58
--- ../clean/linux-4.3/include/linux/kernel_stat.h 2015-11-01 18:05:25.000000000 -0600
+++ include/linux/kernel_stat.h 2018-12-25 15:44:35.743123537 -0600
@@ -38,16 +38,56 @@
struct kernel_stat {
unsigned long irqs_sum;
unsigned int softirqs[NR_SOFTIRQS];
+
+//add by Kun
+ u64 load;
+ u64 previous_load;
+
+ /*
+ * 1: normal load
+ * 2: high load
+ * 0: low load
+ */
+ unsigned long tag;
+
+ /*
+ * current number of high or non-high tag cpu
+ */
+ int num_of_high;
+ int num_of_non_high;
+//end
+};
+
+//add by Kun
+/*
+struct cpu_tag {
+ u64 load;
+ u64 previous_load;
+ unsigned long tag;
};
+*/
+//end
DECLARE_PER_CPU(struct kernel_stat, kstat);
DECLARE_PER_CPU(struct kernel_cpustat, kernel_cpustat);
+//add by Kun
+//DECLARE_PER_CPU(struct cpu_tag, ctag);
+//end
+
/* Must have preemption disabled for this to be meaningful. */
#define kstat_this_cpu this_cpu_ptr(&kstat)
#define kcpustat_this_cpu this_cpu_ptr(&kernel_cpustat)
+//add by Kun
+//#define ctag_this_cpu this_cpu_ptr(&ctag)
+//end
+
#define kstat_cpu(cpu) per_cpu(kstat, cpu)
#define kcpustat_cpu(cpu) per_cpu(kernel_cpustat, cpu)
+//add by Kun
+//#define ctag_cpu(cpu) per_cpu(ctag, cpu)
+//end
+
extern unsigned long long nr_context_switches(void);