File tree Expand file tree Collapse file tree 5 files changed +25
-15
lines changed
Documentation/admin-guide Expand file tree Collapse file tree 5 files changed +25
-15
lines changed Original file line number Diff line number Diff line change 3838
3838
nosmp [SMP] Tells an SMP kernel to act as a UP kernel,
3839
3839
and disable the IO APIC. legacy for "maxcpus=0".
3840
3840
3841
- nosmt [KNL,S390] Disable symmetric multithreading (SMT).
3841
+ nosmt [KNL,MIPS, S390] Disable symmetric multithreading (SMT).
3842
3842
Equivalent to smt=1.
3843
3843
3844
3844
[KNL,X86] Disable symmetric multithreading (SMT).
5735
5735
1: Fast pin select (default)
5736
5736
2: ATC IRMode
5737
5737
5738
- smt= [KNL,S390] Set the maximum number of threads (logical
5738
+ smt= [KNL,MIPS, S390] Set the maximum number of threads (logical
5739
5739
CPUs) to use per physical CPU on systems capable of
5740
5740
symmetric multithreading (SMT). Will be capped to the
5741
5741
actual hardware limit.
Original file line number Diff line number Diff line change @@ -57,6 +57,8 @@ extern int __cpu_logical_map[NR_CPUS];
57
57
/* Mask of CPUs which are currently definitely operating coherently */
58
58
extern cpumask_t cpu_coherent_mask ;
59
59
60
+ extern unsigned int smp_max_threads __initdata ;
61
+
60
62
extern asmlinkage void smp_bootstrap (void );
61
63
62
64
extern void calculate_cpu_foreign_map (void );
Original file line number Diff line number Diff line change 25
25
#include <asm/time.h>
26
26
#include <asm/uasm.h>
27
27
28
- static bool threads_disabled ;
29
28
static DECLARE_BITMAP (core_power , NR_CPUS ) ;
30
29
31
30
struct core_boot_config * mips_cps_core_bootcfg ;
32
31
33
- static int __init setup_nothreads (char * s )
34
- {
35
- threads_disabled = true;
36
- return 0 ;
37
- }
38
- early_param ("nothreads" , setup_nothreads );
39
-
40
32
static unsigned core_vpe_count (unsigned int cluster , unsigned core )
41
33
{
42
- if (threads_disabled )
43
- return 1 ;
44
-
45
- return mips_cps_numvps (cluster , core );
34
+ return min (smp_max_threads , mips_cps_numvps (cluster , core ));
46
35
}
47
36
48
37
static void __init cps_smp_setup (void )
Original file line number Diff line number Diff line change @@ -46,7 +46,8 @@ static void __init smvp_copy_vpe_config(void)
46
46
static unsigned int __init smvp_vpe_init (unsigned int tc , unsigned int mvpconf0 ,
47
47
unsigned int ncpu )
48
48
{
49
- if (tc > ((mvpconf0 & MVPCONF0_PVPE ) >> MVPCONF0_PVPE_SHIFT ))
49
+ if (tc >= smp_max_threads ||
50
+ (tc > ((mvpconf0 & MVPCONF0_PVPE ) >> MVPCONF0_PVPE_SHIFT )))
50
51
return ncpu ;
51
52
52
53
/* Deactivate all but VPE 0 */
Original file line number Diff line number Diff line change @@ -73,6 +73,24 @@ static cpumask_t cpu_core_setup_map;
73
73
74
74
cpumask_t cpu_coherent_mask ;
75
75
76
+ unsigned int smp_max_threads __initdata = UINT_MAX ;
77
+
78
+ static int __init early_nosmt (char * s )
79
+ {
80
+ smp_max_threads = 1 ;
81
+ return 0 ;
82
+ }
83
+ early_param ("nosmt" , early_nosmt );
84
+
85
+ static int __init early_smt (char * s )
86
+ {
87
+ get_option (& s , & smp_max_threads );
88
+ /* Ensure at least one thread is available */
89
+ smp_max_threads = clamp_val (smp_max_threads , 1U , UINT_MAX );
90
+ return 0 ;
91
+ }
92
+ early_param ("smt" , early_smt );
93
+
76
94
#ifdef CONFIG_GENERIC_IRQ_IPI
77
95
static struct irq_desc * call_desc ;
78
96
static struct irq_desc * sched_desc ;
You can’t perform that action at this time.
0 commit comments