RFC Core scheduling v4
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 RFC Latest19 patches 64 repliesIn review
- v3 RFC16 patches 133 repliesSuperseded
- v2 RFC17 patches 91 repliesSuperseded
Changes in v4 from the cover letter
-------------
- Implement a core wide min_vruntime for vruntime comparison of tasks across cpus in a core.
- Fixes a typo bug in setting the forced_idle cpu.
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/19 | stop_machine: Fix stop_cpus_in_progress orderingkernel/ | +2 | 0 replies | |
| 2/19 | sched: Fix kerneldoc comment for ia64_set_curr_taskkernel/ | +1 | 0 replies | |
| 3/19 | sched: Wrap rq::lock accesskernel/ kernel/ kernel/ +7 more | +128 | 0 replies | |
| 4/19 | sched/{rt,deadline}: Fix set_next_task vs pick_next_taskkernel/ kernel/ | +26 | 0 replies | |
| 5/19 | sched: Add task_struct pointer to sched_class::set_curr_taskkernel/ kernel/ kernel/ +4 more | +49 | 0 replies | |
| 6/19 | sched/fair: Export newidle_balance()kernel/ kernel/ | +12 | 0 replies | |
| 7/19 | sched: Allow put_prev_task() to drop rq->lockkernel/ kernel/ kernel/ +4 more | +32 | 0 replies | |
| 8/19 | sched: Rework pick_next_task() slow-pathkernel/ kernel/ kernel/ +4 more | +34 | 0 replies | |
| 9/19 | sched: Introduce sched_class::pick_task()kernel/ kernel/ kernel/ +3 more | +92 | 0 replies | |
| 10/19 | sched: Core-wide rq->lockkernel/ kernel/ kernel/ | +148 | 0 replies | |
| 11/19 | sched: Basic tracking of matching tasksinclude/ kernel/ kernel/ +1 more | +208 | 0 replies | |
| 12/19 | sched: A quick and dirty cgroup tagging interfacekernel/ kernel/ | +82 | 0 replies | |
| 13/19 | sched: Add core wide task selection and scheduling.kernel/ kernel/ | +274 | 0 replies | |
| 14/19 | sched/fair: Add a few assertionskernel/ | +10 | 0 replies | |
| 15/19 | sched: Trivial forced-newidle balancerinclude/ kernel/ kernel/ +1 more | +138 | 0 replies | |
| 16/19 | sched: Debug bits...kernel/ | +42 | 0 replies | |
| 17/19 | sched/fair: wrapper for cfs_rq->min_vruntimekernel/ | +16 | 0 replies | |
| 18/19 | sched/fair: core wide vruntime comparisonkernel/ kernel/ kernel/ | +102 | 0 replies | |
| 19/19 | sched/fair : Wake up forced idle siblings if neededkernel/ | +40 | 0 replies |
Reviews trailers per patch
None of the 19 patches has a Reviewed-by or Acked-by.
| Patch | Peter Zijlstra (Intel) |
|---|---|
| 1/19 | |
| 2/19 | |
| 3/19 | |
| 4/19 | |
| 5/19 | |
| 6/19 | |
| 7/19 | |
| 8/19 | |
| 9/19 | |
| 10/19 | |
| 11/19 | |
| 12/19 | |
| 13/19 | |
| 14/19 | |
| 15/19 | |
| 16/19 | Not-Signed-off-by |
| 17/19 | |
| 18/19 | |
| 19/19 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC PATCH v4 00/19] Core scheduling v4
Fourth iteration of the Core-Scheduling feature.
This version was aiming mostly at addressing the vruntime comparison issues with v3. The main issue seen in v3 was the starvation of interactive tasks when competing with cpu intensive tasks. This issue is mitigated to a large extent.
We have tested and verified that incompatible processes are not selected during schedule. In terms of performance, the impact depends on the workload:
- on CPU intensive applications that use all the logical CPUs with SMT enabled, enabling core scheduling performs better than nosmt.
- on mixed workloads with considerable io compared to cpu usage, nosmt seems to perform better than core scheduling.
v4 is rebased on top of 5.3.5(dc073f193b70):
https://github.com/digitalocean/linux-coresched/tree/coresched/v4-v5.3.5
Changes in v4
-------------
- Implement a core wide min_vruntime for vruntime comparison of tasks across cpus in a core.
- Fixes a typo bug in setting the forced_idle cpu.
Changes in v3
-------------
- Fixes the issue of sibling picking up an incompatible task
- Aaron Lu
- Vineeth Pillai
- Julien Desfossez
- Fixes the issue of starving threads due to forced idle
- Peter Zijlstra
- Fixes the refcounting issue when deleting a cgroup with tag
- Julien Desfossez
- Fixes a crash during cpu offline/online with coresched enabled
- Vineeth Pillai
- Fixes a comparison logic issue in sched_core_find
- Aaron Lu
Changes in v2
-------------
- Fixes for couple of NULL pointer dereference crashes
- Subhra Mazumdar
- Tim Chen
- Improves priority comparison logic for process in different cpus
- Peter Zijlstra
- Aaron Lu
- Fixes a hard lockup in rq locking
- Vineeth Pillai
- Julien Desfossez
- Fixes a performance issue seen on IO heavy workloads
- Vineeth Pillai
- Julien Desfossez
- Fix for 32bit build
- Aubrey Li
TODO
----
- Decide on the API for exposing the feature to userland
- Investigate the source of the overhead even when no tasks are tagged:
https://lkml.org/lkml/2019/10/29/242
- Investigate the performance scaling issue when we have a high number of tagged threads: https://lkml.org/lkml/2019/10/29/248
- Try to optimize the performance for IO-demanding applications:
https://lkml.org/lkml/2019/10/29/261
---
Aaron Lu (3):
sched/fair: wrapper for cfs_rq->min_vruntime sched/fair: core wide vruntime comparison sched/fair : Wake up forced idle siblings if needed
Peter Zijlstra (16):
stop_machine: Fix stop_cpus_in_progress ordering
sched: Fix kerneldoc comment for ia64_set_curr_task
sched: Wrap rq::lock access
sched/{rt,deadline}: Fix set_next_task vs pick_next_task
sched: Add task_struct pointer to sched_class::set_curr_task sched/fair: Export newidle_balance()
sched: Allow put_prev_task() to drop rq->lock
sched: Rework pick_next_task() slow-path
sched: Introduce sched_class::pick_task()
sched: Core-wide rq->lock
sched: Basic tracking of matching tasks
sched: A quick and dirty cgroup tagging interface
sched: Add core wide task selection and scheduling. sched/fair: Add a few assertions
sched: Trivial forced-newidle balancer
sched: Debug bits...
include/linux/sched.h | 9 +- kernel/Kconfig.preempt | 6 + kernel/sched/core.c | 847 +++++++++++++++++++++++++++++++++++++-- kernel/sched/cpuacct.c | 12 +- kernel/sched/deadline.c | 99 +++-- kernel/sched/debug.c | 4 +- kernel/sched/fair.c | 346 +++++++++++----- kernel/sched/idle.c | 42 +- kernel/sched/pelt.h | 2 +- kernel/sched/rt.c | 96 ++--- kernel/sched/sched.h | 246 +++++++++--- kernel/sched/stop_task.c | 35 +- kernel/sched/topology.c | 4 +- kernel/stop_machine.c | 2 + 14 files changed, 1399 insertions(+), 351 deletions(-)
Signature · 1 line
2.17.1