@@ -58,8 +58,8 @@ module_param(torture_type, charp, 0444);
5858MODULE_PARM_DESC (torture_type ,
5959 "Type of lock to torture (spin_lock, spin_lock_irq, mutex_lock, ...)" );
6060
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.
6363
6464// Parse a cpumask kernel parameter. If there are more users later on,
6565// this might need to got to a more central location.
@@ -102,8 +102,8 @@ static const struct kernel_param_ops lt_bind_ops = {
102102 .get = param_get_cpumask ,
103103};
104104
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 );
107107
108108long torture_sched_setaffinity (pid_t pid , const struct cpumask * in_mask );
109109
@@ -1039,18 +1039,18 @@ lock_torture_print_module_parms(struct lock_torture_ops *cur_ops,
10391039 const char * tag )
10401040{
10411041 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 ;
10441044
10451045 cpumask_setall (& cpumask_all );
10461046 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" ,
10481048 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 ,
10501051 cxt .nrealwriters_stress , onoff_holdoff , onoff_interval , rt_boost ,
10511052 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 );
10541054}
10551055
10561056// If requested, maintain call_rcu() chains to keep a grace period always
@@ -1356,8 +1356,8 @@ static int __init lock_torture_init(void)
13561356 writer_fifo ? sched_set_fifo : NULL );
13571357 if (torture_init_error (firsterr ))
13581358 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 );
13611361
13621362 create_reader :
13631363 if (cxt .cur_ops -> readlock == NULL || (j >= cxt .nrealreaders_stress ))
@@ -1367,8 +1367,8 @@ static int __init lock_torture_init(void)
13671367 reader_tasks [j ]);
13681368 if (torture_init_error (firsterr ))
13691369 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 );
13721372 }
13731373 if (stat_interval > 0 ) {
13741374 firsterr = torture_create_kthread (lock_torture_stats , NULL ,
0 commit comments