Re: [PATCH 3/9] cpu/SMT: Store the current/max number of threads

2023-06-14 Thread Laurent Dufour
On 13/06/2023 20:53:56, Thomas Gleixner wrote: > On Tue, Jun 13 2023 at 19:16, Laurent Dufour wrote: >> On 10/06/2023 23:26:18, Thomas Gleixner wrote: >>> On Thu, May 25 2023 at 01:56, Michael Ellerman wrote: #ifdef CONFIG_HOTPLUG_SMT enum cpuhp_smt_control cpu_smt_control __read_mostly

Re: [PATCH 3/9] cpu/SMT: Store the current/max number of threads

2023-06-13 Thread Thomas Gleixner
On Tue, Jun 13 2023 at 19:16, Laurent Dufour wrote: > On 10/06/2023 23:26:18, Thomas Gleixner wrote: >> On Thu, May 25 2023 at 01:56, Michael Ellerman wrote: >>> #ifdef CONFIG_HOTPLUG_SMT >>> enum cpuhp_smt_control cpu_smt_control __read_mostly = CPU_SMT_ENABLED; >>> +static unsigned int cpu_smt_

Re: [PATCH 3/9] cpu/SMT: Store the current/max number of threads

2023-06-13 Thread Laurent Dufour
On 10/06/2023 23:26:18, Thomas Gleixner wrote: > On Thu, May 25 2023 at 01:56, Michael Ellerman wrote: >> #ifdef CONFIG_HOTPLUG_SMT >> enum cpuhp_smt_control cpu_smt_control __read_mostly = CPU_SMT_ENABLED; >> +static unsigned int cpu_smt_max_threads __ro_after_init; >> +unsigned int cpu_smt_num_

Re: [PATCH 3/9] cpu/SMT: Store the current/max number of threads

2023-06-10 Thread Thomas Gleixner
On Sat, Jun 10 2023 at 23:26, Thomas Gleixner wrote: > On Thu, May 25 2023 at 01:56, Michael Ellerman wrote: > /* > * The decision whether SMT is supported can only be done after the full > * CPU identification. Called from architecture code. > */ > -void __init cpu_smt_check_topology(void)

Re: [PATCH 3/9] cpu/SMT: Store the current/max number of threads

2023-06-10 Thread Thomas Gleixner
On Thu, May 25 2023 at 01:56, Michael Ellerman wrote: > #ifdef CONFIG_HOTPLUG_SMT > enum cpuhp_smt_control cpu_smt_control __read_mostly = CPU_SMT_ENABLED; > +static unsigned int cpu_smt_max_threads __ro_after_init; > +unsigned int cpu_smt_num_threads; Why needs this to be global? cpu_smt_contro

[PATCH 3/9] cpu/SMT: Store the current/max number of threads

2023-05-24 Thread Michael Ellerman
A subsequent patch will enable partial SMT states, ie. when not all SMT threads are brought online. To support that the SMT code needs to know the maximum number of SMT threads, and also the currently configured number. The arch code knows the max number of threads, so have the arch code pass tha