[..snip..]
85e511df3cec changesdiff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 225b31aaee55..2859fc7e2da2 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1025,7 +1025,7 @@ static bool update_deadline(struct cfs_rq *cfs_rq, struct sched_entity *se)
/*
* The task has consumed its request, reschedule.
*/
- return true;
+ return (cfs_rq->nr_running > 1);
Was there a strong reason why Peter decided to use "rq->nr_running"
instead of "cfs_rq->nr_running" with PREEMPT_SHORT in update_curr()?
I wonder if it was to force a pick_next_task() cycle to dequeue a
possibly delayed entity
but AFAICT, "cfs_rq->nr_running" should
account for the delayed entity still on the cfs_rq and perhaps the
early return in update_curr() can just be changed to use
"cfs_rq->nr_running". Not sure if I'm missing something trivial.
if (cfs_rq->nr_running > 1) resched
to
if (rq->nr_running == 1) not_resched
which does lower the bar to trigger resched
Yes, I think your proposal make sense, the resched should only
be triggered between 2 cfs tasks,
and the restore to update_deadline() is not needed, something like below
in update_curr() could also work:
if (cfs_rq->nr_running == 1)
return;
thanks,
Chenyu