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: <CAJWu+ooyRsFFA13=rqMBCFgf_JeHsOr16-ayuECaQ5Xz48mrqQ@mail.gmail.com>
Date:   Thu, 9 Apr 2020 13:54:13 -0400
From:   Joel Fernandes <joelaf@...gle.com>
To:     Cheng Jian <cj.chengjian@...wei.com>
Cc:     Vineeth Remanan Pillai <vpillai@...italocean.com>,
        aaron.lwe@...il.com, aubrey.intel@...il.com,
        aubrey.li@...ux.intel.com,
        "Cc: Frederic Weisbecker" <fweisbec@...il.com>,
        Julien Desfossez <jdesfossez@...italocean.com>,
        "Joel Fernandes (Google)" <joel@...lfernandes.org>,
        Kees Cook <keescook@...omium.org>,
        Greg Kerr <kerrnel@...gle.com>,
        LKML <linux-kernel@...r.kernel.org>, mgorman@...hsingularity.net,
        Ingo Molnar <mingo@...nel.org>, naravamudan@...italocean.com,
        pauld@...hat.com, pawan.kumar.gupta@...ux.intel.com,
        pbonzini@...hat.com, Peter Zijlstra <peterz@...radead.org>,
        Paul Turner <pjt@...gle.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        tim.c.chen@...ux.intel.com,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Valentin Schneider <valentin.schneider@....com>,
        xiexiuqi@...wei.com, huawei.libin@...wei.com, w.f@...wei.com
Subject: Re: [PATCH] sched/arm64: store cpu topology before notify_cpu_starting

On Wed, Apr 1, 2020 at 7:27 AM Cheng Jian <cj.chengjian@...wei.com> wrote:
>
> when SCHED_CORE enabled, sched_cpu_starting() uses thread_sibling as
> SMT_MASK to initialize rq->core, but only after store_cpu_topology(),
> the thread_sibling is ready for use.
>
>         notify_cpu_starting()
>             -> sched_cpu_starting()     # use thread_sibling
>
>         store_cpu_topology(cpu)
>             -> update_siblings_masks    # set thread_sibling
>
> Fix this by doing notify_cpu_starting later, just like x86 do.
>
> Signed-off-by: Cheng Jian <cj.chengjian@...wei.com>

Just a high-level question, why does core-scheduling matter on ARM64?
Is it for HPC workloads?

Thanks,

 - Joel


> ---
>  arch/arm64/kernel/smp.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> index 5407bf5d98ac..a427c14e82af 100644
> --- a/arch/arm64/kernel/smp.c
> +++ b/arch/arm64/kernel/smp.c
> @@ -236,13 +236,18 @@ asmlinkage notrace void secondary_start_kernel(void)
>         cpuinfo_store_cpu();
>
>         /*
> -        * Enable GIC and timers.
> +        * Store cpu topology before notify_cpu_starting,
> +        * CPUHP_AP_SCHED_STARTING requires SMT topology
> +        * been initialized for SCHED_CORE.
>          */
> -       notify_cpu_starting(cpu);
> -
>         store_cpu_topology(cpu);
>         numa_add_cpu(cpu);
>
> +       /*
> +        * Enable GIC and timers.
> +        */
> +       notify_cpu_starting(cpu);
> +
>         /*
>          * OK, now it's safe to let the boot CPU continue.  Wait for
>          * the CPU migration code to notice that the CPU is online
> --
> 2.17.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ