From 932dceef4c2bc794e4e31087dac5351d0676c405 Mon Sep 17 00:00:00 2001 From: Todd Poynor Date: Mon, 10 Apr 2017 18:31:28 -0700 Subject: [PATCH] ANDROID: sched/walt: make walt_ktime_suspended __read_mostly Most walt variables in hot code paths are __read_mostly and grouped together in the .data section, including these variables that show up as frequently accessed in gem5 simulation: walt_ravg_window, walt_disabled, walt_account_wait_time, and walt_freq_account_wait_time. The exception is walt_ktime_suspended, which is also accessed in many of the same hot paths. It is also almost entirely accessed by reads. Move it to __read_mostly in hopes of keeping it in the same cache line as the other hot data. Signed-off-by: Todd Poynor --- kernel/sched/walt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/walt.c b/kernel/sched/walt.c index 7f686ff..1b4bb23 100644 --- a/kernel/sched/walt.c +++ b/kernel/sched/walt.c @@ -81,7 +81,7 @@ __read_mostly unsigned int walt_ravg_window = 20000000; static unsigned int sync_cpu; static ktime_t ktime_last; -static bool walt_ktime_suspended; +static __read_mostly bool walt_ktime_suspended; static unsigned int task_load(struct task_struct *p) { -- 2.7.4