[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190515135322.19393-4-parth@linux.ibm.com>
Date: Wed, 15 May 2019 19:23:19 +0530
From: Parth Shah <parth@...ux.ibm.com>
To: linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org
Cc: mingo@...hat.com, peterz@...radead.org, dietmar.eggemann@....com,
dsmythies@...us.net
Subject: [RFCv2 3/6] sched/core: Update turbo_sched count only when required
Use the get/put methods to add/remove the use of TurboSched support from
the cgroup.
Signed-off-by: Parth Shah <parth@...ux.ibm.com>
---
kernel/sched/core.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index facbedd2554e..4c55b5399985 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -7216,10 +7216,13 @@ static int cpu_util_max_write_u64(struct cgroup_subsys_state *css,
* Classify the tasks belonging to the last bucket of MAX UCLAMP as
* jitters
*/
- if (uclamp_bucket_id(max_value) == 0)
+ if (uclamp_bucket_id(max_value) == 0) {
tg->turbo_sched_enabled = 1;
- else if (tg->turbo_sched_enabled)
+ turbo_sched_get();
+ } else if (tg->turbo_sched_enabled) {
tg->turbo_sched_enabled = 0;
+ turbo_sched_put();
+ }
/* Update effective clamps to track the most restrictive value */
cpu_util_update_eff(css, UCLAMP_MAX);
--
2.17.1
Powered by blists - more mailing lists