[lkml]   [2018]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[RFC 33/60] cosched: Allow resched_curr() to be called for hierarchical runqueues
The function resched_curr() kicks the scheduler for a certain runqueue,
assuming that the runqueue is already locked.

If called for a hierarchical runqueue, the equivalent operation is to
kick the leader. Unfortunately, we don't know whether we also hold
the CPU runqueue lock at this point, which is needed for resched_curr()
to work. Therefore, fall back to resched_cpu_locked() on higher levels.

Signed-off-by: Jan H. Schönherr <>
kernel/sched/core.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 337bae6fa836..c4358396f588 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -457,6 +457,11 @@ void resched_curr(struct rq *rq)


+ if (rq->sdrq_data.level)
+ return resched_cpu_locked(rq->sdrq_data.leader);
if (test_tsk_need_resched(curr))

 \ /
  Last update: 2018-09-07 23:47    [W:0.459 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site