Skip to content

sched_ext: Introduce rq lock tracking

Andrea Righi lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 6 repliesIn review
  2. v22 patches 5 repliesSuperseded
  3. v12 patches 6 repliesSuperseded

Changes in v3 from the cover letter

- remove unnecessary rq != NULL optimization check in SCX_CALL_OP()
- reorder SCX_CALL_OP*() arguments to group static args together
- link to v2: https://lore.kernel.org/all/[email protected]/

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2sched_ext: Track currently locked rqkernel/sched/ext.c kernel/sched/ext_idle.c+95 -595 replies
2/2sched_ext: Fix missing rq lock in scx_bpf_cpuperf_set()kernel/sched/ext.c+23 -40 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchAndrea Righi
1/2A-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] sched_ext: Introduce rq lock tracking

Add rq lock tracking to sched_ext ops callbacks to enable scx_bpf_*() kfuncs to detect whether a specific rq is currently locked and safely operate with it.

If no rq is locked, the target rq lock can be acquired. If a different rq is already locked, the operation can either fail (triggering an ops error), deferred using IRQ work, or managed accordingly to avoid deadlocks.

This patchset is also available in the following git branch:

git://git.kernel.org/pub/scm/linux/kernel/git/arighi/linux.git scx-rq-lock-tracking

Changes in v3:
- remove unnecessary rq != NULL optimization check in SCX_CALL_OP()
- reorder SCX_CALL_OP*() arguments to group static args together
- link to v2: https://lore.kernel.org/all/[email protected]/

Changes in v2:
- store currently locked rq in a percpu variable
- link to v1: https://lore.kernel.org/all/[email protected]

Andrea Righi (2):
sched_ext: Track currently locked rq
sched_ext: Fix missing rq lock in scx_bpf_cpuperf_set()

 kernel/sched/ext.c      | 179 +++++++++++++++++++++++++++++++-----------------
 kernel/sched/ext_idle.c |   2 +-
 2 files changed, 118 insertions(+), 63 deletions(-)