@@ -1205,29 +1205,21 @@ static int pseudo_lock_measure_cycles(struct rdtgroup *rdtgrp, int sel)
1205
1205
plr -> cpu = cpu ;
1206
1206
1207
1207
if (sel == 1 )
1208
- thread = kthread_create_on_node (measure_cycles_lat_fn , plr ,
1209
- cpu_to_node (cpu ),
1210
- "pseudo_lock_measure/%u" ,
1211
- cpu );
1208
+ thread = kthread_run_on_cpu (measure_cycles_lat_fn , plr ,
1209
+ cpu , "pseudo_lock_measure/%u" );
1212
1210
else if (sel == 2 )
1213
- thread = kthread_create_on_node (measure_l2_residency , plr ,
1214
- cpu_to_node (cpu ),
1215
- "pseudo_lock_measure/%u" ,
1216
- cpu );
1211
+ thread = kthread_run_on_cpu (measure_l2_residency , plr ,
1212
+ cpu , "pseudo_lock_measure/%u" );
1217
1213
else if (sel == 3 )
1218
- thread = kthread_create_on_node (measure_l3_residency , plr ,
1219
- cpu_to_node (cpu ),
1220
- "pseudo_lock_measure/%u" ,
1221
- cpu );
1214
+ thread = kthread_run_on_cpu (measure_l3_residency , plr ,
1215
+ cpu , "pseudo_lock_measure/%u" );
1222
1216
else
1223
1217
goto out ;
1224
1218
1225
1219
if (IS_ERR (thread )) {
1226
1220
ret = PTR_ERR (thread );
1227
1221
goto out ;
1228
1222
}
1229
- kthread_bind (thread , cpu );
1230
- wake_up_process (thread );
1231
1223
1232
1224
ret = wait_event_interruptible (plr -> lock_thread_wq ,
1233
1225
plr -> thread_done == 1 );
@@ -1315,18 +1307,14 @@ int rdtgroup_pseudo_lock_create(struct rdtgroup *rdtgrp)
1315
1307
1316
1308
plr -> thread_done = 0 ;
1317
1309
1318
- thread = kthread_create_on_node (pseudo_lock_fn , rdtgrp ,
1319
- cpu_to_node (plr -> cpu ),
1320
- "pseudo_lock/%u" , plr -> cpu );
1310
+ thread = kthread_run_on_cpu (pseudo_lock_fn , rdtgrp ,
1311
+ plr -> cpu , "pseudo_lock/%u" );
1321
1312
if (IS_ERR (thread )) {
1322
1313
ret = PTR_ERR (thread );
1323
1314
rdt_last_cmd_printf ("Locking thread returned error %d\n" , ret );
1324
1315
goto out_cstates ;
1325
1316
}
1326
1317
1327
- kthread_bind (thread , plr -> cpu );
1328
- wake_up_process (thread );
1329
-
1330
1318
ret = wait_event_interruptible (plr -> lock_thread_wq ,
1331
1319
plr -> thread_done == 1 );
1332
1320
if (ret < 0 ) {
0 commit comments