[PATCH v3 1/2] sched/fair: make capacity_margin __read_mostly
From: Leo Yan
Date: Wed Oct 04 2017 - 04:04:54 EST
Variable 'capacity_margin' is used with read operation for most cases
to calculate the capacity margin, put it into __read_mostly section.
Cc: Dietmar Eggemann <dietmar.eggemann@xxxxxxx>
Cc: Morten Rasmussen <morten.rasmussen@xxxxxxx>
Cc: Chris Redpath <Chris.Redpath@xxxxxxx>
Cc: Joel Fernandes <joelaf@xxxxxxxxxx>
Cc: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
Cc: Patrick Bellasi <patrick.bellasi@xxxxxxx>
Signed-off-by: Leo Yan <leo.yan@xxxxxxxxxx>
---
kernel/sched/fair.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 70ba32e..ad03bf4 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -129,7 +129,7 @@ unsigned int sysctl_sched_cfs_bandwidth_slice = 5000UL;
*
* (default: ~20%)
*/
-unsigned int capacity_margin = 1280;
+unsigned int capacity_margin __read_mostly = 1280;
static inline void update_load_add(struct load_weight *lw, unsigned long inc)
{
--
2.7.4