lkml.org 
[lkml]   [2018]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sched/fair: use RETRY_TASK in idle_balance
On Thu, Apr 26, 2018 at 12:37:02PM +0200, Vincent Guittot wrote:
> Use RETRY_TASK in idle_balance when we want select_task_rq() function to
> rerun the complete task selection path
>
> Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
> ---
> kernel/sched/fair.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 0951d1c..ba49f83 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -9862,7 +9862,7 @@ static int idle_balance(struct rq *this_rq, struct rq_flags *rf)
>
> /* Is there a task of a high priority class? */
> if (this_rq->nr_running != this_rq->cfs.h_nr_running)
> - pulled_task = -1;
> + pulled_task = RETRY_TASK;

This doesn't make sense, pulled_task is an integer, not a task pointer.
Also see how the caller in select_task_rq_fair() converts a negative
into RETRY_TASK.

\
 
 \ /
  Last update: 2018-04-26 13:50    [W:0.061 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site