Re: [PATCH 07/10] cpu/SMT: Allow enabling partial SMT states via sysfs

2023-06-22 Thread Michael Ellerman
Thomas Gleixner writes: > On Thu, Jun 15 2023 at 17:46, Laurent Dufour wrote: >> >> -if (ctrlval != cpu_smt_control) { >> +orig_threads = cpu_smt_num_threads; >> +cpu_smt_num_threads = num_threads; >> + >> +if (num_threads > orig_threads) { >> +ret = cpuhp_smt_enable(

Re: [PATCH 07/10] cpu/SMT: Allow enabling partial SMT states via sysfs

2023-06-22 Thread Thomas Gleixner
On Thu, Jun 15 2023 at 17:46, Laurent Dufour wrote: > > - if (ctrlval != cpu_smt_control) { > + orig_threads = cpu_smt_num_threads; > + cpu_smt_num_threads = num_threads; > + > + if (num_threads > orig_threads) { > + ret = cpuhp_smt_enable(); > + } else if (num_thr

[PATCH 07/10] cpu/SMT: Allow enabling partial SMT states via sysfs

2023-06-15 Thread Laurent Dufour
From: Michael Ellerman Add support to the /sys/devices/system/cpu/smt/control interface for enabling a specified number of SMT threads per core, including partial SMT states where not all threads are brought online. The current interface accepts "on" and "off", to enable either 1 or all SMT thre