[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1502918443-30169-6-git-send-email-mathieu.poirier@linaro.org>
Date: Wed, 16 Aug 2017 15:20:41 -0600
From: Mathieu Poirier <mathieu.poirier@...aro.org>
To: mingo@...hat.com, peterz@...radead.org
Cc: tj@...nel.org, vbabka@...e.cz, lizefan@...wei.com,
akpm@...ux-foundation.org, weiyongjun1@...wei.com,
juri.lelli@....com, rostedt@...dmis.org, claudio@...dence.eu.com,
luca.abeni@...tannapisa.it, bristot@...hat.com,
linux-kernel@...r.kernel.org, mathieu.poirier@...aro.org
Subject: [PATCH 5/7] cgroup: Concentrate DL related validation code in one place
Having two different places to validate DL operations makes no sense. As
such move everything in the same function.
Signed-off-by: Mathieu Poirier <mathieu.poirier@...aro.org>
---
kernel/cgroup/cpuset.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index 18df143b4013..8d2ba5591dfb 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -477,6 +477,15 @@ static int validate_dl_change(struct cpuset *cur, struct cpuset *trial)
struct cpuset *cs;
/*
+ * We can't shrink if we won't have enough room for SCHED_DEADLINE
+ * tasks.
+ */
+ if (is_cpu_exclusive(cur) &&
+ !cpuset_cpumask_can_shrink(cur->cpus_allowed,
+ trial->cpus_allowed))
+ goto out;
+
+ /*
* The cpuset.sched_load_balance flag is flipped off on
* the current cpuset.
*/
@@ -606,16 +615,6 @@ static int validate_change(struct cpuset *cur, struct cpuset *trial)
goto out;
}
- /*
- * We can't shrink if we won't have enough room for SCHED_DEADLINE
- * tasks.
- */
- ret = -EBUSY;
- if (is_cpu_exclusive(cur) &&
- !cpuset_cpumask_can_shrink(cur->cpus_allowed,
- trial->cpus_allowed))
- goto out;
-
ret = 0;
out:
rcu_read_unlock();
--
2.7.4
Powered by blists - more mailing lists