lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKfTPtAT6khrY=3yfZdntG6ZEkYx9dg9yjEYtbcEcaxa3KU7DA@mail.gmail.com>
Date:   Thu, 26 Apr 2018 15:11:02 +0200
From:   Vincent Guittot <vincent.guittot@...aro.org>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Ingo Molnar <mingo@...nel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sched/fair: use RETRY_TASK in idle_balance

On 26 April 2018 at 13:49, Peter Zijlstra <peterz@...radead.org> wrote:
> 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@...aro.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.

My goal was to try to make it a bit more readable about the meaning of
-1 but it fails with the type returned by idle_balance

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ