sched: Rewrite MM CID management
Status from this message: The following commit has been merged into the core/rseq branch of tip:
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest20 patches 19 repliesApplied
- v420 patches 14 repliesSuperseded
- v320 patches 44 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 20 patches | 8 replies | Superseded | |
| v1 | 19 patches | 19 replies | Superseded |
Changes in v5 from the cover letter
- Zero mm_cid::transit on init - Mathieu
- Rephrase change logs - Mathiue
- Picked up Reviewed/Acked-by tags
Patches in v5 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/20 | sched/mmcid: Revert the complex CID managementinclude/ kernel/ kernel/ +1 more | +64 | 0 replies | |
| 2/20 | sched/mmcid: Use proper data structuresinclude/ include/ include/ +4 more | +85 | 0 replies | |
| 3/20 | sched/mmcid: Cacheline align MM CID storageinclude/ | +2 | 0 replies | |
| 4/20 | sched: Fixup whitespace damagekernel/ | +4 | 0 replies | |
| 5/20 | sched/mmcid: Move scheduler code out of global headerinclude/ kernel/ | +18 | 0 replies | |
| 6/20 | sched/mmcid: Prevent pointless work in mm_update_cpus_allowed()kernel/ | +8 | 0 replies | |
| 7/20 | cpumask: Introduce cpumask_weighted_or()include/ include/ lib/ | +37 | 0 replies | |
| 8/20 | sched/mmcid: Use cpumask_weighted_or()kernel/ | +3 | 0 replies | |
| 9/20 | cpumask: Cache num_possible_cpus()include/ kernel/ | +27 | 7 replies | |
| 10/20 | sched/mmcid: Convert mm CID mask to a bitmapinclude/ kernel/ kernel/ | +9 | 0 replies | |
| 11/20 | signal: Move MMCID exit out of sighand lockinclude/ kernel/ kernel/ +1 more | +5 | 0 replies | |
| 12/20 | sched/mmcid: Move initialization out of lineinclude/ kernel/ | +15 | 0 replies | |
| 13/20 | sched/mmcid: Provide precomputed maximal valueinclude/ kernel/ kernel/ +1 more | +50 | 0 replies | |
| 14/20 | sched/mmcid: Serialize sched_mm_cid_fork()/exit() with a mutexinclude/ kernel/ | +24 | 0 replies | |
| 15/20 | sched/mmcid: Introduce per task/CPU ownership infrastructureinclude/ include/ kernel/ +1 more | +75 | 0 replies | |
| 16/20 | sched/mmcid: Provide new scheduler CID mechanisminclude/ include/ kernel/ +1 more | +168 | 0 replies | |
| 17/20 | sched/mmcid: Provide CID ownership mode fixup functionsinclude/ kernel/ | +258 | 0 replies | |
| 18/20 | irqwork: Move data struct to a types headerinclude/ include/ | +16 | 0 replies | |
| 19/20 | sched/mmcid: Implement deferred mode changeinclude/ kernel/ | +59 | 0 replies | |
| 20/20 | sched/mmcid: Switch over to the new mechanisminclude/ include/ kernel/ +2 more | +103 | 3 replies |
Reviews trailers per patch
19 of 20 patches have a Reviewed-by or Acked-by.
| Patch | Mathieu Desnoyers | Yury Norov (NVIDIA) | Shrikanth Hegde | Marek Szyprowski | Paul E. McKenney |
|---|---|---|---|---|---|
| 1/20 | A-b | ||||
| 2/20 | R-b | ||||
| 3/20 | R-b | ||||
| 4/20 | R-b | ||||
| 5/20 | R-b | A-b | |||
| 6/20 | R-b | ||||
| 7/20 | R-b | R-b | |||
| 8/20 | R-b | A-b | |||
| 9/20 | R-b | R-b | R-b | T-b | T-b |
| 10/20 | R-b | A-b | |||
| 11/20 | R-b | ||||
| 12/20 | R-b | ||||
| 13/20 | R-b | ||||
| 14/20 | R-b | ||||
| 15/20 | |||||
| 16/20 | R-b | ||||
| 17/20 | R-b | ||||
| 18/20 | R-b | ||||
| 19/20 | R-b | ||||
| 20/20 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.
Cover letter [patch V5 00/20] sched: Rewrite MM CID management
This is a follow up on the V4 series which can be found here:
https://lore.kernel.org/[email protected]
The V1 cover letter contains a detailed analyisis of the issues:
https://lore.kernel.org/[email protected]
TLDR: The CID management is way to complex and adds significant overhead into scheduler hotpaths.
The series rewrites MM CID management in a more simplistic way which focusses on low overhead in the scheduler while maintaining per task CIDs as long as the number of threads is not exceeding the number of possible CPUs.
The series is based on the V6 series of the rseq rewrite:
https://lore.kernel.org/[email protected]
which is also available from git:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/rseq
The series on top of the tip core/rseq branch is available from git as well:
git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git rseq/cid
Changes vs. V4:
- Zero mm_cid::transit on init - Mathieu
- Rephrase change logs - Mathiue
- Picked up Reviewed/Acked-by tags
Delta patch to V4 below.
Thanks,
tglx
---
kernel/sched/core.c +1 -0
@@ -10848,6 +10848,7 @@ void mm_init_cid(struct mm_struct *mm, struct task_struct *p) { mm->mm_cid.max_cids =0 ; mm->mm_cid.percpu =0 ; + mm->mm_cid.transit =0 ; mm->mm_cid.nr_cpus_allowed = p->nr_cpus_allowed; mm->mm_cid.users =0 ; mm->mm_cid.pcpu_thrs =0 ;