Optimize the cpu hotplug locking -v2
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 65 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | hotplug: Optimize {get,put}_online_cpus()include/ include/ kernel/ +1 more | +238 | 4 replies | |
| 2/6 | rcu: Create rcu_sync infrastructureinclude/ kernel/ kernel/ | +174 | 4 replies | |
| 3/6 | hotplug: Optimize cpu_hotplug_{begin,done}() using rcu_syncinclude/ kernel/ | +28 | 1 reply | |
| 4/6 | rcusync: Introduce struct rcu_sync_opsinclude/ kernel/ | +45 | 5 replies | |
| 5/6 | rcusync: Add the CONFIG_PROVE_RCU checksinclude/ kernel/ | +27 | 1 reply | |
| 6/6 | rcusync: Introduce rcu_sync_dtor()include/ kernel/ | +23 | 1 reply |
Reviews trailers per patch
All 6 patches have a Reviewed-by or Acked-by.
| Patch | Oleg Nesterov | Paul McKenney | Rik van Riel | Lai Jiangshan |
|---|---|---|---|---|
| 1/6 | R-b | R-b | R-b | |
| 2/6 | R-b | R-b | ||
| 3/6 | R-b | R-b | ||
| 4/6 | R-b | |||
| 5/6 | R-b | |||
| 6/6 | 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 4 reviewers.
Cover letter [PATCH 0/6] Optimize the cpu hotplug locking -v2
The current cpu hotplug lock is a single global lock; therefore excluding hotplug is a very expensive proposition even though it is rare occurrence under normal operation.
There is a desire for a more light weight implementation of {get,put}_online_cpus() from both the NUMA scheduling as well as the -RT side.
The current hotplug lock is a full reader preference lock -- and thus supports reader recursion. However since we're making the read side lock much cheaper it is the expectation that it will also be used far more. Which in turn would lead to writer starvation.
Therefore the new lock proposed is completely fair; albeit somewhat expensive on the write side. This in turn means that we need a per-task nesting count to support reader recursion.
This patch-set is in 3 parts;
1) The new hotplug lock implementation, very fast on the read side, very expensive on the write side; patch 1
2) Some new rcu_sync primitive by Oleg; patches 2,4-6
3) Employment of the rcy_sync thingy to optimize the write-side of the new hotplug lock; patch 3
Barring further comments/objections I'll stuff this lot into -tip and go look at getting the numa bits into there too.
Changes since -v1:
- Addressed all comments from Paul
- Actually made sure to send the version that builds
- Added a few patches from Oleg extending the rcu_sync primitive
- Added Reviewed-by for Oleg to patches 1,3 -- please holler if you disagree!
--- include/linux/rcusync.h | 57 +++++++++++ kernel/rcusync.c | 152 +++++++++++++++++++++++++++++++ include/linux/cpu.h | 68 +++++++++++++- include/linux/sched.h | 3 kernel/Makefile | 3 kernel/cpu.c | 223 +++++++++++++++++++++++++++++++++------------- kernel/sched/core.c | 2 7 files changed, 444 insertions(+), 64 deletions(-)