[RFC 30/60] cosched: Disallow share modification on task groups for now

From: Jan H. SchÃnherr
Date: Fri Sep 07 2018 - 17:51:30 EST


The code path is not yet adjusted for coscheduling. Disable
it for now.

Signed-off-by: Jan H. SchÃnherr <jschoenh@xxxxxxxxx>
---
kernel/sched/fair.c | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 30e5ff30f442..8504790944bf 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -9942,6 +9942,15 @@ int sched_group_set_shares(struct task_group *tg, unsigned long shares)
{
int i;

+#ifdef CONFIG_COSCHEDULING
+ /*
+ * FIXME: This function has not been adjusted for coscheduling.
+ * Disable it completely for now.
+ */
+ WARN_ON_ONCE(1);
+ return -EINVAL;
+#endif
+
/*
* We can't change the weight of the root cgroup.
*/
@@ -9955,6 +9964,7 @@ int sched_group_set_shares(struct task_group *tg, unsigned long shares)
goto done;

tg->shares = shares;
+
for_each_possible_cpu(i) {
struct rq *rq = cpu_rq(i);
struct sched_entity *se = tg->cfs_rq[i]->my_se;
--
2.9.3.1.gcba166c.dirty