blob: d0b5d11040cbd9667012f6d4dd6e515478f614b4 [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: NOUPSTREAM: 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.
[CPNOTE: 30/06/21] Lee: Vendor GKI related changes
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, 15 insertions(+)
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);
@@ -69,6 +70,8 @@ struct cpu_topology {
cpumask_t core_sibling;
cpumask_t cluster_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
@@ -1469,6 +1469,8 @@ struct task_struct {
struct callback_head mce_kill_me;
int mce_count;
#endif
+ ANDROID_VENDOR_DATA_ARRAY(1, 64);
+ ANDROID_OEM_DATA_ARRAY(1, 6);
#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>
@@ -81,6 +82,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
@@ -66,6 +66,7 @@
#include <linux/syscalls.h>
#include <linux/task_work.h>
#include <linux/tsacct_kern.h>
+#include <linux/android_vendor.h>
#include <asm/tlb.h>
@@ -440,6 +441,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
};
@@ -861,6 +864,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);
@@ -1116,6 +1121,8 @@ struct rq {
unsigned char core_forceidle;
unsigned int core_forceidle_seq;
#endif
+
+ ANDROID_VENDOR_DATA_ARRAY(1, 96);
};
#ifdef CONFIG_FAIR_GROUP_SCHED