Skip to content

sched_ext: document and enforce vtime ordering constraints

Tao Cui bpf lkml sched-ext 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 1 replyIn review
  2. v22 patches 3 repliesSuperseded

Changes in v3 from the cover letter

- 1/2: "less than 2^63 apart" (not "within"), folded into the paragraph above
- 2/2: use time_before() instead of open-coded comparison, drop the comment, fix the wrap direction and timing, state both lag and lead bounds, Fixes corrected to upstream a4103eacc2ab (Tejun)

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2sched_ext: document the rolling-cursor requirement for dsq_vtimekernel/sched/ext/ext.c+3 -10 replies
2/2sched_ext/scx_flatcg: make cgv_node_less() wraparound-safetools/sched_ext/scx_flatcg.bpf.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/2] sched_ext: document and enforce vtime ordering constraints

From: Tao Cui <[email protected]>

Patch 1 documents the rolling-cursor requirement for vtime ordering in scx_bpf_dsq_insert_vtime(). Patch 2 fixes scx_flatcg's comparator to use the cyclic comparison, which is correct there because cgrp_cap_budget() upholds that requirement.

Changes since v2:
- 1/2: "less than 2^63 apart" (not "within"), folded into the paragraph above
- 2/2: use time_before() instead of open-coded comparison, drop the comment, fix the wrap direction and timing, state both lag and lead bounds, Fixes corrected to upstream a4103eacc2ab (Tejun)

Changes since v1:
- drop 1/2 (kernel priq comparator change): the cyclic ordering is the documented contract; a plain comparison causes unbounded starvation at the natural wrap (Andrea, Tejun)
- new 1/2: document the rolling-cursor requirement instead
- 2/2 (flatcg) unchanged

Tao Cui (2):
sched_ext: document the rolling-cursor requirement for dsq_vtime sched_ext/scx_flatcg: make cgv_node_less() wraparound-safe

 kernel/sched/ext/ext.c           | 4 +++-
 tools/sched_ext/scx_flatcg.bpf.c | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)
Signature · 1 line
2.43.0