@@ -58,8 +58,8 @@ module_param(torture_type, charp, 0444);
58
58
MODULE_PARM_DESC (torture_type ,
59
59
"Type of lock to torture (spin_lock, spin_lock_irq, mutex_lock, ...)" );
60
60
61
- static cpumask_var_t readers_bind ; // Bind the readers to the specified set of CPUs.
62
- static cpumask_var_t writers_bind ; // Bind the writers to the specified set of CPUs.
61
+ static cpumask_var_t bind_readers ; // Bind the readers to the specified set of CPUs.
62
+ static cpumask_var_t bind_writers ; // Bind the writers to the specified set of CPUs.
63
63
64
64
// Parse a cpumask kernel parameter. If there are more users later on,
65
65
// this might need to got to a more central location.
@@ -102,8 +102,8 @@ static const struct kernel_param_ops lt_bind_ops = {
102
102
.get = param_get_cpumask ,
103
103
};
104
104
105
- module_param_cb (readers_bind , & lt_bind_ops , & readers_bind , 0644 );
106
- module_param_cb (writers_bind , & lt_bind_ops , & writers_bind , 0644 );
105
+ module_param_cb (bind_readers , & lt_bind_ops , & bind_readers , 0644 );
106
+ module_param_cb (bind_writers , & lt_bind_ops , & bind_writers , 0644 );
107
107
108
108
long torture_sched_setaffinity (pid_t pid , const struct cpumask * in_mask );
109
109
@@ -1039,18 +1039,18 @@ lock_torture_print_module_parms(struct lock_torture_ops *cur_ops,
1039
1039
const char * tag )
1040
1040
{
1041
1041
static cpumask_t cpumask_all ;
1042
- cpumask_t * rcmp = cpumask_nonempty (readers_bind ) ? readers_bind : & cpumask_all ;
1043
- cpumask_t * wcmp = cpumask_nonempty (writers_bind ) ? writers_bind : & cpumask_all ;
1042
+ cpumask_t * rcmp = cpumask_nonempty (bind_readers ) ? bind_readers : & cpumask_all ;
1043
+ cpumask_t * wcmp = cpumask_nonempty (bind_writers ) ? bind_writers : & cpumask_all ;
1044
1044
1045
1045
cpumask_setall (& cpumask_all );
1046
1046
pr_alert ("%s" TORTURE_FLAG
1047
- "--- %s%s: acq_writer_lim=%d call_rcu_chains=%d long_hold=%d nested_locks=%d nreaders_stress=%d nwriters_stress=%d onoff_holdoff=%d onoff_interval=%d rt_boost=%d rt_boost_factor=%d shuffle_interval=%d shutdown_secs=%d stat_interval=%d stutter=%d verbose=%d writer_fifo=%d readers_bind=%*pbl writers_bind=%*pbl \n" ,
1047
+ "--- %s%s: acq_writer_lim=%d bind_readers=%*pbl bind_writers=%*pbl call_rcu_chains=%d long_hold=%d nested_locks=%d nreaders_stress=%d nwriters_stress=%d onoff_holdoff=%d onoff_interval=%d rt_boost=%d rt_boost_factor=%d shuffle_interval=%d shutdown_secs=%d stat_interval=%d stutter=%d verbose=%d writer_fifo=%d\n" ,
1048
1048
torture_type , tag , cxt .debug_lock ? " [debug]" : "" ,
1049
- acq_writer_lim , call_rcu_chains , long_hold , nested_locks , cxt .nrealreaders_stress ,
1049
+ acq_writer_lim , cpumask_pr_args (rcmp ), cpumask_pr_args (wcmp ),
1050
+ call_rcu_chains , long_hold , nested_locks , cxt .nrealreaders_stress ,
1050
1051
cxt .nrealwriters_stress , onoff_holdoff , onoff_interval , rt_boost ,
1051
1052
rt_boost_factor , shuffle_interval , shutdown_secs , stat_interval , stutter ,
1052
- verbose , writer_fifo ,
1053
- cpumask_pr_args (rcmp ), cpumask_pr_args (wcmp ));
1053
+ verbose , writer_fifo );
1054
1054
}
1055
1055
1056
1056
// If requested, maintain call_rcu() chains to keep a grace period always
@@ -1356,8 +1356,8 @@ static int __init lock_torture_init(void)
1356
1356
writer_fifo ? sched_set_fifo : NULL );
1357
1357
if (torture_init_error (firsterr ))
1358
1358
goto unwind ;
1359
- if (cpumask_nonempty (writers_bind ))
1360
- torture_sched_setaffinity (writer_tasks [i ]-> pid , writers_bind );
1359
+ if (cpumask_nonempty (bind_writers ))
1360
+ torture_sched_setaffinity (writer_tasks [i ]-> pid , bind_writers );
1361
1361
1362
1362
create_reader :
1363
1363
if (cxt .cur_ops -> readlock == NULL || (j >= cxt .nrealreaders_stress ))
@@ -1367,8 +1367,8 @@ static int __init lock_torture_init(void)
1367
1367
reader_tasks [j ]);
1368
1368
if (torture_init_error (firsterr ))
1369
1369
goto unwind ;
1370
- if (cpumask_nonempty (readers_bind ))
1371
- torture_sched_setaffinity (reader_tasks [j ]-> pid , readers_bind );
1370
+ if (cpumask_nonempty (bind_readers ))
1371
+ torture_sched_setaffinity (reader_tasks [j ]-> pid , bind_readers );
1372
1372
}
1373
1373
if (stat_interval > 0 ) {
1374
1374
firsterr = torture_create_kthread (lock_torture_stats , NULL ,
0 commit comments