Skip to content

sched: Migrate disable support

Peter Zijlstra lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 35 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9stop_machine: Add function and caller debug infoinclude/linux/stop_machine.h kernel/stop_machine.c lib/dump_stack.c+27 -30 replies
2/9sched: Fix balance_callback()kernel/sched/core.c kernel/sched/sched.h+77 -441 reply
3/9sched/hotplug: Ensure only per-cpu kthreads run during hotplugkernel/sched/core.c kernel/sched/sched.h+117 -22 replies
4/9sched/core: Wait for tasks being pushed away on hotplugkernel/sched/core.c kernel/sched/sched.h+41 -10 replies
5/9sched/hotplug: Consolidate task migration on CPU unpluginclude/linux/cpuhotplug.h include/linux/sched/hotplug.h kernel/cpu.c +1 more+46 -1162 replies
6/9sched: Massage set_cpus_allowedkernel/sched/core.c kernel/sched/deadline.c kernel/sched/sched.h+26 -141 reply
7/9sched: Add migrate_disable()include/linux/preempt.h include/linux/sched.h kernel/sched/core.c +2 more+179 -714 replies
8/9sched: Fix migrate_disable() vs set_cpus_allowed_ptr()include/linux/sched.h kernel/sched/core.c+123 -206 replies
9/9sched/core: Make migrate disable and CPU hotplug cooperativekernel/sched/core.c kernel/sched/sched.h+34 -60 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/9] sched: Migrate disable support

Hi,

Here's my take on migrate_disable(). It avoids growing a second means of changing the affinity, documents how the things violates locking rules but still mostly works.

It also avoids blocking completely, so no more futex band-aids required.

Also, no more atomics/locks on the fast path.

I also put in a comment that explains how the whole concept is fundamentally flawed but a necessary evil to get PREEMPT_RT going -- for now.

Somewhat tested with PREEMPT_RT.

---
 include/linux/cpuhotplug.h    |    1 
 include/linux/preempt.h       |   60 +++
 include/linux/sched.h         |    4 
 include/linux/sched/hotplug.h |    2 
 include/linux/stop_machine.h  |    5 
 kernel/cpu.c                  |    9 
 kernel/sched/core.c           |  673 +++++++++++++++++++++++++++++++-----------
 kernel/sched/deadline.c       |    5 
 kernel/sched/sched.h          |   24 +
 kernel/stop_machine.c         |   23 +
 lib/dump_stack.c              |    2 
 lib/smp_processor_id.c        |    5 
 12 files changed, 635 insertions(+), 178 deletions(-)