summaryrefslogtreecommitdiff
path: root/kernel/sched/sched.h
diff options
context:
space:
mode:
authorPavankumar Kondeti <pkondeti@codeaurora.org>2018-09-20 15:31:36 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2019-06-25 20:37:06 -0700
commitf395d5810f27a22e5ff0230ca7b3ef88857d98d9 (patch)
tree0657de979d070f93516d97c9069b3b81b7eb5ca9 /kernel/sched/sched.h
parentc94369b4c1fc531a4521dacdb6b08a70ea71fc1b (diff)
sched/walt: Fix the memory leak of idle task load pointers
The memory for task load pointers are allocated twice for each idle thread except for the boot CPU. This happens during boot from idle_threads_init()->idle_init() in the following 2 paths. 1. idle_init()->fork_idle()->copy_process()-> sched_fork()->init_new_task_load() 2. idle_init()->fork_idle()-> init_idle()->init_new_task_load() The memory allocation for all tasks happens through the 1st path, so use the same for idle tasks and kill the 2nd path. Since the idle thread of boot CPU does not go through fork_idle(), allocate the memory for it separately. Change-Id: I4696a414ffe07d4114b56d326463026019e278f1 Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org> [schikk@codeaurora.org: resolved merge conflicts] Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
Diffstat (limited to 'kernel/sched/sched.h')
-rw-r--r--kernel/sched/sched.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 12883703a021..ffae8d49d988 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1154,7 +1154,7 @@ extern unsigned int __read_mostly sched_downmigrate;
extern unsigned int __read_mostly sysctl_sched_spill_nr_run;
extern unsigned int __read_mostly sched_load_granule;
-extern void init_new_task_load(struct task_struct *p, bool idle_task);
+extern void init_new_task_load(struct task_struct *p);
extern u64 sched_ktime_clock(void);
extern int got_boost_kick(void);
extern int register_cpu_cycle_counter_cb(struct cpu_cycle_counter_cb *cb);
@@ -1644,7 +1644,7 @@ static inline struct sched_cluster *rq_cluster(struct rq *rq)
return NULL;
}
-static inline void init_new_task_load(struct task_struct *p, bool idle_task)
+static inline void init_new_task_load(struct task_struct *p)
{
}