Commit 57ccf5c
committed
sched_ext: Fix enqueue_task_scx() truncation of upper enqueue flags
enqueue_task_scx() takes int enq_flags from the sched_class interface.
SCX enqueue flags starting at bit 32 (SCX_ENQ_PREEMPT and above) are
silently truncated when passed through activate_task(). extra_enq_flags
was added as a workaround - storing high bits in rq->scx.extra_enq_flags
and OR-ing them back in enqueue_task_scx(). However, the OR target is
still the int parameter, so the high bits are lost anyway.
The current impact is limited as the only affected flag is SCX_ENQ_PREEMPT
which is informational to the BPF scheduler - its loss means the scheduler
doesn't know about preemption but doesn't cause incorrect behavior.
Fix by renaming the int parameter to core_enq_flags and introducing a
u64 enq_flags local that merges both sources. All downstream functions
already take u64 enq_flags.
Fixes: f0e1a06 ("sched_ext: Implement BPF extensible scheduler class")
Cc: [email protected] # v6.12+
Acked-by: Andrea Righi <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>1 parent 2a0596d commit 57ccf5c
1 file changed
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1470 | 1470 | | |
1471 | 1471 | | |
1472 | 1472 | | |
1473 | | - | |
| 1473 | + | |
1474 | 1474 | | |
1475 | 1475 | | |
1476 | 1476 | | |
| 1477 | + | |
1477 | 1478 | | |
1478 | 1479 | | |
1479 | 1480 | | |
1480 | 1481 | | |
1481 | | - | |
1482 | | - | |
1483 | 1482 | | |
1484 | 1483 | | |
1485 | 1484 | | |
| |||
0 commit comments