Skip to content

sched: Reduce runqueue lock contention -v6

Peter Zijlstra lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest21 patches 57 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/21sched: Provide scheduler_ipi() callback in response to smp_send_reschedule()arch/alpha/kernel/smp.c arch/arm/kernel/smp.c arch/blackfin/mach-common/smp.c +23 more+62 -503 replies
2/21sched: Always provide p->on_cpuinclude/linux/sched.h kernel/sched.c+30 -201 reply
3/21mutex: Use p->on_cpu for the adaptive spininclude/linux/mutex.h include/linux/sched.h kernel/mutex-debug.c +4 more+39 -561 reply
4/21sched: Change the ttwu success detailskernel/sched.c+8 -106 replies
5/21sched: Clean up ttwu statskernel/sched.c+34 -351 reply
6/21sched: Provide p->on_rqinclude/linux/sched.h kernel/sched.c kernel/sched_debug.c +2 more+30 -281 reply
7/21sched: Serialize p->cpus_allowed and ttwu() using p->pi_lockkernel/sched.c+16 -211 reply
8/21sched: Drop the rq argument to sched_class::select_task_rq()include/linux/sched.h kernel/sched.c kernel/sched_fair.c +3 more+41 -271 reply
9/21sched: Remove rq argument to sched_class::task_waking()include/linux/sched.h kernel/sched.c kernel/sched_fair.c+11 -51 reply
10/21sched: Deal with non-atomic min_vruntime reads on 32bitskernel/sched.c kernel/sched_fair.c+20 -21 reply
11/21sched: Delay task_contributes_to_load()include/linux/sched.h kernel/sched.c+5 -121 reply
12/21sched: Also serialize ttwu_local() with p->pi_lockkernel/sched.c+17 -111 reply
13/21sched: Add p->pi_lock to task_rq_lock()kernel/sched.c+47 -56100 replies
14/21sched: Drop rq->lock from first part of wake_up_new_task()kernel/sched.c+3 -141 reply
15/21sched: Drop rq->lock from sched_exec()kernel/sched.c+5 -101 reply
16/21sched: Remove rq->lock from the first half of ttwu()kernel/sched.c+37 -281 reply
17/21sched: Remove rq argument from ttwu_stat()kernel/sched.c+5 -31 reply
18/21sched: Rename ttwu_post_activationkernel/sched.c+6 -31 reply
19/21sched: Restructure ttwu some morekernel/sched.c+59 -341 reply
20/21sched: Move the second half of ttwu() to the remote cpuinclude/linux/sched.h init/Kconfig kernel/sched.c +1 more+69 -11 reply
21/21sched: Remove need_migrate_task()kernel/sched.c+1 -161 reply

Reviews trailers per patch

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

PatchFrank RowandThomas GleixnerRussell KingMartin SchwidefskyChris MetcalfJesper NilssonBenjamin Herrenschmidt
1/21R-b R-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b
2/21R-b R-b
3/21R-b R-b Requested-by Requested-by
4/21R-b R-b
5/21R-b R-b
6/21R-b R-b
7/21R-b R-b
8/21R-b R-b
9/21R-b R-b
10/21R-b R-b
11/21R-b R-b
12/21R-b R-b
13/21R-b R-b
14/21R-b R-b
15/21R-b R-b
16/21R-b R-b
17/21R-b R-b
18/21R-b R-b
19/21R-b R-b
20/21R-b R-b
21/21R-b 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 7 reviewers.

Read the v1 thread

Cover letter [PATCH 00/21] sched: Reduce runqueue lock contention -v6

This patch series aims to optimize remote wakeups by moving most of the work of the wakeup to the remote cpu and avoid bouncing runqueue data structures where possible.

As measured by sembench (which basically creates a wakeup storm) on my dual-socket westmere:

$ for i in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor ; do echo performance > $i; done
$ echo 4096 32000 64 128 > /proc/sys/kernel/sem
$ ./sembench -t 2048 -w 1900 -o 0
unpatched: run time 30 seconds 647278 worker burns per second
patched:   run time 30 seconds 816715 worker burns per second

I've queued this series for .40.