lkml.org 
[lkml]   [2019]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFCv2 3/6] sched/core: Update turbo_sched count only when required
Date
Use the get/put methods to add/remove the use of TurboSched support from
the cgroup.

Signed-off-by: Parth Shah <parth@linux.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
\
 
 \ /
  Last update: 2019-05-15 15:55    [W:0.058 / U:16.076 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site