lkml.org 
[lkml]   [2018]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC 31/60] cosched: Don't disable idle tick for now
Date
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@amazon.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
\
 
 \ /
  Last update: 2018-09-07 23:52    [W:0.564 / U:4.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site