bpf_iter_scx_dsq_new(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… bpf_iter_scx_dsq_new πŸ’…

From the Kernel API Manual, bestie β€” yes, we're in the kernel docs and this page is literally called Create a DSQ iterator. It's giving scheduler-core realness. πŸŽ€

✨ NAME ✨

  • bpf_iter_scx_dsq_new β€” Create a DSQ iterator. Periodt. πŸ’…

🌸 SYNOPSIS 🌸

__bpf_kfunc int bpf_iter_scx_dsq_new (struct bpf_iter_scx_dsq *it , u64
       dsq_id , u64 flags , const struct bpf_prog_aux *aux );

No cap, that's the whole signature and we're keeping it exactly as-is. 🫢

πŸ¦‹ ARGUMENTS πŸ¦‹

  • it β€” iterator to initialize. This is the iterator cutie you're setting up. ✨
  • dsq_id β€” DSQ to iterate. The DSQ you're gonna walk through. πŸ’«
  • flags β€” SCX_DSQ_ITER_*. The flag fam goes here. πŸŽ€
  • aux β€” implicit BPF argument to access bpf_prog_aux hidden from BPF progs. It's literally hidden from BPF progs, iykyk. πŸ™ˆ

πŸ’– DESCRIPTION πŸ’–

Initialize BPF iterator it which can be used with bpf_for_each to walk tasks in the DSQ specified by dsq_id. πŸŒ€

Iteration using it only includes tasks which are already queued when this function is invoked. That's the vibe check, bestie: already queued when this function is invoked = in the walk; not queued yet = not invited to this iteration. πŸ’…

Lowkey important: this iteration is about the tasks already queued at invocation time. No future arrivals sneaking in here. 🌸

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./kernel/sched/ext/ext.c β€” plus the whole SEE ALSO friend group:


Cute sign-off, bestie: source/version ./kernel/sched/ext, date October 2026, page bpf_iter_scx_dsq_new(9) β€” mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from