@@ -277,7 +277,7 @@ s32 BPF_STRUCT_OPS(atropos_select_cpu, struct task_struct *p, s32 prev_cpu,
277
277
struct task_ctx * task_ctx ;
278
278
struct bpf_cpumask * p_cpumask ;
279
279
pid_t pid = p -> pid ;
280
- bool prev_domestic , has_idle_wholes ;
280
+ bool prev_domestic , has_idle_cores ;
281
281
s32 cpu ;
282
282
283
283
refresh_tune_params ();
@@ -344,7 +344,7 @@ s32 BPF_STRUCT_OPS(atropos_select_cpu, struct task_struct *p, s32 prev_cpu,
344
344
goto direct ;
345
345
}
346
346
347
- has_idle_wholes = !bpf_cpumask_empty (idle_smtmask );
347
+ has_idle_cores = !bpf_cpumask_empty (idle_smtmask );
348
348
349
349
/* did @p get pulled out to a foreign domain by e.g. greedy execution? */
350
350
prev_domestic = bpf_cpumask_test_cpu (prev_cpu ,
@@ -385,19 +385,19 @@ s32 BPF_STRUCT_OPS(atropos_select_cpu, struct task_struct *p, s32 prev_cpu,
385
385
* domestic CPU and then move onto foreign.
386
386
*/
387
387
388
- /* If there is a domestic whole idle CPU , dispatch directly */
389
- if (has_idle_wholes ) {
388
+ /* If there is a domestic idle core , dispatch directly */
389
+ if (has_idle_cores ) {
390
390
cpu = scx_bpf_pick_idle_cpu ((const struct cpumask * )p_cpumask ,
391
- SCX_PICK_IDLE_CPU_WHOLE );
391
+ SCX_PICK_IDLE_CORE );
392
392
if (cpu >= 0 ) {
393
393
stat_add (ATROPOS_STAT_DIRECT_DISPATCH , 1 );
394
394
goto direct ;
395
395
}
396
396
}
397
397
398
398
/*
399
- * If @prev_cpu was domestic and is idle itself even though the whole
400
- * core isn't, picking @prev_cpu may improve L1/2 locality.
399
+ * If @prev_cpu was domestic and is idle itself even though the core
400
+ * isn't, picking @prev_cpu may improve L1/2 locality.
401
401
*/
402
402
if (prev_domestic && scx_bpf_test_and_clear_cpu_idle (prev_cpu )) {
403
403
stat_add (ATROPOS_STAT_DIRECT_DISPATCH , 1 );
@@ -415,7 +415,7 @@ s32 BPF_STRUCT_OPS(atropos_select_cpu, struct task_struct *p, s32 prev_cpu,
415
415
/*
416
416
* Domestic domain is fully booked. If there are CPUs which are idle and
417
417
* under-utilized, ignore domain boundaries and push the task there. Try
418
- * to find a whole idle CPU first.
418
+ * to find an idle core first.
419
419
*/
420
420
if (task_ctx -> all_cpus && direct_greedy_cpumask &&
421
421
!bpf_cpumask_empty ((const struct cpumask * )direct_greedy_cpumask )) {
@@ -427,15 +427,12 @@ s32 BPF_STRUCT_OPS(atropos_select_cpu, struct task_struct *p, s32 prev_cpu,
427
427
goto enoent ;
428
428
}
429
429
430
- /*
431
- * Try to find a whole idle CPU in the previous foreign and then
432
- * any domain.
433
- */
434
- if (has_idle_wholes ) {
430
+ /* Try to find an idle core in the previous and then any domain */
431
+ if (has_idle_cores ) {
435
432
if (domc -> direct_greedy_cpumask ) {
436
433
cpu = scx_bpf_pick_idle_cpu ((const struct cpumask * )
437
434
domc -> direct_greedy_cpumask ,
438
- SCX_PICK_IDLE_CPU_WHOLE );
435
+ SCX_PICK_IDLE_CORE );
439
436
if (cpu >= 0 ) {
440
437
stat_add (ATROPOS_STAT_DIRECT_GREEDY , 1 );
441
438
goto direct ;
@@ -445,7 +442,7 @@ s32 BPF_STRUCT_OPS(atropos_select_cpu, struct task_struct *p, s32 prev_cpu,
445
442
if (direct_greedy_cpumask ) {
446
443
cpu = scx_bpf_pick_idle_cpu ((const struct cpumask * )
447
444
direct_greedy_cpumask ,
448
- SCX_PICK_IDLE_CPU_WHOLE );
445
+ SCX_PICK_IDLE_CORE );
449
446
if (cpu >= 0 ) {
450
447
stat_add (ATROPOS_STAT_DIRECT_GREEDY_FAR , 1 );
451
448
goto direct ;
@@ -454,7 +451,7 @@ s32 BPF_STRUCT_OPS(atropos_select_cpu, struct task_struct *p, s32 prev_cpu,
454
451
}
455
452
456
453
/*
457
- * No whole idle CPU . Is there any idle CPU?
454
+ * No idle core . Is there any idle CPU?
458
455
*/
459
456
if (domc -> direct_greedy_cpumask ) {
460
457
cpu = scx_bpf_pick_idle_cpu ((const struct cpumask * )
0 commit comments