blob: ad3b89077989bf02aa18f5763474a158d6516101 [file] [log] [blame]
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Date: Wed, 28 Oct 2020 00:02:04 -0700
Subject: ANDROID: sched: gki: add padding to some structs to support WALT
Add padding to below structs to support WALT based accounting:
1. struct cpu_topology
2. struct task_struct
3. struct sched_domain_shared
4. struct task_group
5. struct root_domain
6. struct rq
To accommodate potential future changes, reserving more memory than
what WALT needs today.
Bug: 171858786
Change-Id: If6d901174fc7963be3ae44daa799cb2953669ec1
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
---
include/linux/arch_topology.h | 3 +++
include/linux/sched.h | 2 +-
include/linux/sched/topology.h | 3 +++
kernel/sched/sched.h | 7 +++++++
4 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/include/linux/arch_topology.h b/include/linux/arch_topology.h
--- a/include/linux/arch_topology.h
+++ b/include/linux/arch_topology.h
@@ -7,6 +7,7 @@
#include <linux/types.h>
#include <linux/percpu.h>
+#include <linux/android_vendor.h>
void topology_normalize_cpu_scale(void);
int topology_update_cpu_topology(void);
@@ -54,6 +55,8 @@ struct cpu_topology {
cpumask_t thread_sibling;
cpumask_t core_sibling;
cpumask_t llc_sibling;
+
+ cpumask_t android_vendor_data1;
};
#ifdef CONFIG_GENERIC_ARCH_TOPOLOGY
diff --git a/include/linux/sched.h b/include/linux/sched.h
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1364,7 +1364,7 @@ struct task_struct {
__mce_reserved : 62;
struct callback_head mce_kill_me;
#endif
- ANDROID_VENDOR_DATA_ARRAY(1, 2);
+ ANDROID_VENDOR_DATA_ARRAY(1, 64);
#ifdef CONFIG_KRETPROBES
struct llist_head kretprobe_instances;
diff --git a/include/linux/sched/topology.h b/include/linux/sched/topology.h
--- a/include/linux/sched/topology.h
+++ b/include/linux/sched/topology.h
@@ -3,6 +3,7 @@
#define _LINUX_SCHED_TOPOLOGY_H
#include <linux/topology.h>
+#include <linux/android_vendor.h>
#include <linux/sched/idle.h>
@@ -74,6 +75,8 @@ struct sched_domain_shared {
atomic_t ref;
atomic_t nr_busy_cpus;
int has_idle_cores;
+
+ ANDROID_VENDOR_DATA(1);
};
struct sched_domain {
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -65,6 +65,7 @@
#include <linux/syscalls.h>
#include <linux/task_work.h>
#include <linux/tsacct_kern.h>
+#include <linux/android_vendor.h>
#include <asm/tlb.h>
@@ -423,6 +424,8 @@ struct task_group {
struct uclamp_se uclamp[UCLAMP_CNT];
/* Latency-sensitive flag used for a task group */
unsigned int latency_sensitive;
+
+ ANDROID_VENDOR_DATA_ARRAY(1, 4);
#endif
};
@@ -832,6 +835,8 @@ struct root_domain {
* CPUs of the rd. Protected by RCU.
*/
struct perf_domain __rcu *pd;
+
+ ANDROID_VENDOR_DATA_ARRAY(1, 4);
};
extern void init_defrootdomain(void);
@@ -1063,6 +1068,8 @@ struct rq {
#endif
unsigned int push_busy;
struct cpu_stop_work push_work;
+
+ ANDROID_VENDOR_DATA_ARRAY(1, 96);
};
#ifdef CONFIG_FAIR_GROUP_SCHED