Skip to content

scx_p2dq: update ATQ API to the newest version#9

Draft
etsal wants to merge 4 commits intomultics69:lavd-cpu-bw15from
etsal:p2dq-atq-update
Draft

scx_p2dq: update ATQ API to the newest version#9
etsal wants to merge 4 commits intomultics69:lavd-cpu-bw15from
etsal:p2dq-atq-update

Conversation

@etsal
Copy link

@etsal etsal commented Nov 11, 2025

Update the p2dq scheduler to use the new ATQ API:

  1. Add task_ctx_common to the scheduler's task_p2dq task state.
  2. Update all scx_atq_*() call sites to use the embedded task_ctx_common struct instead of pushing/popping the PID of the task. Remove the DSQ fallback path now that the ATQ has infinite size.
  3. Remove the task lookup call sites, since we're now grabbing the task_ctx directly from the ATQ. Add the PID to task_p2dq to enable task_ctx -> struct task_struct lookups.
  4. Factor out the ATQ membership cancelling code into atq.bpf.c from cgroup_bw.bpf.c, and use it to implement .dequeue() for p2dq.

cc: Daniel Hodges hodgesds@meta.com
Signed-off-by: Emil Tsalapatis emil@etsalapatis.com

@etsal etsal force-pushed the p2dq-atq-update branch 2 times, most recently from 703a7c3 to 57bf43a Compare November 11, 2025 21:29
@etsal
Copy link
Author

etsal commented Nov 11, 2025

cc @hodgesds

@multics69 multics69 force-pushed the lavd-cpu-bw15 branch 2 times, most recently from 5b0377f to 0bc9101 Compare November 12, 2025 01:48
Copy link
Owner

@multics69 multics69 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @etsal ! LGTM

@multics69 multics69 force-pushed the lavd-cpu-bw15 branch 2 times, most recently from ad0ed04 to 95af48b Compare November 13, 2025 12:13
@etsal etsal force-pushed the p2dq-atq-update branch 3 times, most recently from fd7913e to a2da097 Compare November 14, 2025 01:56
@etsal etsal force-pushed the p2dq-atq-update branch 4 times, most recently from 71b185c to 44646e7 Compare November 14, 2025 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants