Skip to content

sched_ext: Follow-up fixes for exit_cpu accuracy

Cheng-Yang Chou rcu sched-ext 7 versions – Applied

Status from this message: Applied to sched_ext/for-7.3.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest2 patches 2 repliesApplied
  2. v62 patches 4 repliesSuperseded
  3. v52 patches 2 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v42 patches5 repliesSuperseded
v32 patches4 repliesSuperseded
v22 patches9 repliesSuperseded
v12 patches0 repliesSuperseded

Changes in v7 from the cover letter

- Read smp_processor_id() once into a local variable (Andrea Righi).
- Link to v6:
https://lore.kernel.org/all/[email protected]/

Patches in v7 Applied

#Subject and filesSizeRepliesApplied
1/2sched_ext: Fix exit_cpu accuracy for lockup pathskernel/sched/ext.c kernel/sched/ext_internal.h+9 -80 replies
2/2sched_ext, rcu: Upgrade RCU stall paths to report cpumask of stalled CPUsinclude/linux/sched/ext.h kernel/rcu/tree.c kernel/rcu/tree_exp.h +3 more+83 -160 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchAndrea RighiPaul E. McKenney
1/2R-b
2/2R-b R-b

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

Read the v7 thread

Cover letter [PATCH v7 sched_ext/for-7.2 0/2] sched_ext: Follow-up fixes for exit_cpu accuracy

From: yphbchou0911 <[email protected]>

Follow-up of Tejun's suggestion [1], discussed in v2 and the subsequent review thread [2].

Patch 1 fixes exit_cpu accuracy for the hard lockup and softlockup paths. For the RCU stall path, -1 is used as a placeholder until patch 2 threads the cpumask.

Patch 2 upgrades panic_on_rcu_stall() and scx_rcu_cpu_stall() to accept a cpumask of stalled CPUs, stored in scx_sched and piped directly to scx_dump_state().

Based on sched_ext/for-next (180c5cefd174).

Changes in v7:
- Read smp_processor_id() once into a local variable (Andrea Righi).
- Link to v6:
https://lore.kernel.org/all/[email protected]/

Changes in v6:
- Drop stalled_mask parameter from synchronize_rcu_expedited_stall() (Paul McKenney).
- Link to v5:
https://lore.kernel.org/r/[email protected]/

Changes in v5:
- Replace dynamic cpumask allocation in both RCU stall paths with static rcu_stall_cpumask and rcu_exp_stall_cpumask (Paul McKenney).
- Link to v4:
https://lore.kernel.org/r/[email protected]/

Changes in v4:
- Store stall mask in scx_sched rather than scx_exit_info (Tejun Heo).
- Use __GFP_NOWARN for cpumask allocations in both RCU stall paths.
- Link to v3:
https://lore.kernel.org/r/[email protected]/

Changes in v3:
- Drop patch 1 of v2 ("Normalize exit dump header to 'on CPU N'"), already applied to sched_ext/for-7.2.
- Replace single stalled_cpu int with const struct cpumask * in panic_on_rcu_stall() and scx_rcu_cpu_stall() (Paul McKenney, Tejun Heo).
- Thread cpumask through the expedited stall path (Tejun Heo).
- Falls back to cpu_none_mask on allocation failure.
- Link to v2:
https://lore.kernel.org/r/[email protected]/

Changes in v2:
- Use raw_smp_processor_id() in synchronize_rcu_expedited_wait() to avoid CONFIG_DEBUG_PREEMPT splat.
- Link to v1:
https://lore.kernel.org/r/[email protected]/

[1]: https://lore.kernel.org/r/[email protected]/
[2]: https://lore.kernel.org/r/[email protected]/

Thanks,
Cheng-Yang

---

Cheng-Yang Chou (2):
sched_ext: Fix exit_cpu accuracy for lockup paths sched_ext, rcu: Upgrade RCU stall paths to report cpumask of stalled
CPUs

 include/linux/sched/ext.h   |  4 +-
 kernel/rcu/tree.c           |  3 ++
 kernel/rcu/tree_exp.h       |  5 ++-
 kernel/rcu/tree_stall.h     | 13 ++++--
 kernel/sched/ext.c          | 86 +++++++++++++++++++++++++++++++------
 kernel/sched/ext_internal.h |  3 +-
 6 files changed, 91 insertions(+), 23 deletions(-)
Signature · 1 line
2.43.0