79278909

Date: 2024-12-13 16:04:57
Score: 1.5
Natty:
Report link

As far as I found out, the task can't be taken off the DSQ in the task_tick function. What can be done is mark the task's pid (through a bpf map or other global data structure) and dispatch it to another DSQ using scx_bpf_dispatch when the enqueue callback is called. When the slice is exhausted, if SCX_OPS_ENQ_LAST is enabled as an ops flag OR the task is not the only one on this CPU, the task is preempted and .enqueue is called on it. It is there that it can be moved to another DSQ or BPF structure.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Amir Kooshky