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: <CAKfTPtA9zdU76Q6AyjB8_gqvAm8SP_N0rJuydQdNFbDAKSb2jw@mail.gmail.com>
Date:   Wed, 23 Dec 2020 12:30:26 +0100
From:   Vincent Guittot <vincent.guittot@...aro.org>
To:     ultrachin@....com
Cc:     linux-kernel <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        heddchen@...cent.com,
        xiaoggchen(陈小光) <xiaoggchen@...cent.com>
Subject: Re: [PATCH] sched: pull tasks when CPU is about to run SCHED_IDLE tasks

On Wed, 23 Dec 2020 at 09:32, <ultrachin@....com> wrote:
>
> From: Chen Xiaoguang <xiaoggchen@...cent.com>
>
> Before a CPU switches from running SCHED_NORMAL task to
> SCHED_IDLE task, trying to pull SCHED_NORMAL tasks from other

Could you explain more in detail why you only care about this use case
in particular and not the general case?

> CPU by doing load_balance first.
>
> Signed-off-by: Chen Xiaoguang <xiaoggchen@...cent.com>
> Signed-off-by: Chen He <heddchen@...cent.com>
> ---
>  kernel/sched/fair.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index ae7ceba..0a26132 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -7004,6 +7004,11 @@ struct task_struct *
>         struct task_struct *p;
>         int new_tasks;
>
> +       if (prev &&
> +           fair_policy(prev->policy) &&

Why do you need a prev and fair task  ? You seem to target the special
case of pick_next_task  but in this case why not only testing rf!=null
 to make sure to not return immediately after jumping to the idle
label?

Also why not doing that for default case too ? i.e. balance_fair() ?

> +           sched_idle_cpu(rq->cpu))
> +               goto idle;
> +
>  again:
>         if (!sched_fair_runnable(rq))
>                 goto idle;
> --
> 1.8.3.1
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ