[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180907214047.26914-32-jschoenh@amazon.de>
Date: Fri, 7 Sep 2018 23:40:18 +0200
From: Jan H. Schönherr <jschoenh@...zon.de>
To: Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>
Cc: Jan H. Schönherr <jschoenh@...zon.de>,
linux-kernel@...r.kernel.org
Subject: [RFC 31/60] cosched: Don't disable idle tick for now
Coscheduling relies on the leader to drive preemption of the
group when the time slice is exhausted. This is also the case,
when the leader is idle but the group as a whole is not.
Because of that, we currently cannot disable the idle tick.
Keep the tick enabled in code. This relieves the user from disabling
NOHZ and allows us to gradually improve the situation later.
Signed-off-by: Jan H. Schönherr <jschoenh@...zon.de>
---
kernel/time/tick-sched.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 5b33e2f5c0ed..5e9c2a7d4ea9 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -861,6 +861,20 @@ static void tick_nohz_full_update_tick(struct tick_sched *ts)
static bool can_stop_idle_tick(int cpu, struct tick_sched *ts)
{
+#ifdef CONFIG_COSCHEDULING
+ /*
+ * FIXME: Coscheduling relies on the leader to drive preemption of the
+ * group when the time slice is exhausted. This is also the case,
+ * when the leader is idle but the group as a whole is not.
+ * Because of that, we currently cannot disable the idle tick.
+ *
+ * Short-term, we could disable the idle tick, in cases where the
+ * whole group is idle. Long-term, we can consider switching
+ * leadership of the group to a non-idle CPU.
+ */
+ return false;
+#endif
+
/*
* If this CPU is offline and it is the one which updates
* jiffies, then give up the assignment and let it be taken by
--
2.9.3.1.gcba166c.dirty
Powered by blists - more mailing lists