linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] Optimize the cpu hotplug locking -v2
@ 2013-10-08 10:25 Peter Zijlstra
  2013-10-08 10:25 ` [PATCH 1/6] hotplug: Optimize {get,put}_online_cpus() Peter Zijlstra
                   ` (7 more replies)
  0 siblings, 8 replies; 73+ messages in thread
From: Peter Zijlstra @ 2013-10-08 10:25 UTC (permalink / raw)
  To: Oleg Nesterov, Paul McKenney
  Cc: Mel Gorman, Rik van Riel, Srikar Dronamraju, Ingo Molnar,
	Andrea Arcangeli, Johannes Weiner, Thomas Gleixner,
	Steven Rostedt, Linus Torvalds, linux-kernel, Peter Zijlstra

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(-)


^ permalink raw reply	[flat|nested] 73+ messages in thread

end of thread, other threads:[~2013-10-20 16:58 UTC | newest]

Thread overview: 73+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-08 10:25 [PATCH 0/6] Optimize the cpu hotplug locking -v2 Peter Zijlstra
2013-10-08 10:25 ` [PATCH 1/6] hotplug: Optimize {get,put}_online_cpus() Peter Zijlstra
2013-10-08 15:08   ` Rik van Riel
2013-10-10  5:47   ` Andrew Morton
2013-10-10 11:06     ` Oleg Nesterov
2013-10-10 14:55       ` Paul E. McKenney
2013-10-08 10:25 ` [PATCH 2/6] rcu: Create rcu_sync infrastructure Peter Zijlstra
2013-10-08 20:40   ` Jonathan Corbet
2013-10-09 19:52     ` Peter Zijlstra
2013-10-17  2:56   ` Lai Jiangshan
2013-10-17 10:36   ` Srikar Dronamraju
2013-10-08 10:25 ` [PATCH 3/6] hotplug: Optimize cpu_hotplug_{begin,done}() using rcu_sync Peter Zijlstra
2013-10-08 16:28   ` Paul E. McKenney
2013-10-08 10:25 ` [PATCH 4/6] rcusync: Introduce struct rcu_sync_ops Peter Zijlstra
2013-10-08 16:30   ` Paul E. McKenney
2013-10-17  2:07   ` Lai Jiangshan
     [not found]     ` <20131017154228.GL4553@linux.vnet.ibm.com>
2013-10-18  1:23       ` Lai Jiangshan
2013-10-18 12:10         ` Oleg Nesterov
2013-10-20 16:58           ` Paul E. McKenney
2013-10-08 10:25 ` [PATCH 5/6] rcusync: Add the CONFIG_PROVE_RCU checks Peter Zijlstra
2013-10-08 16:30   ` Paul E. McKenney
2013-10-08 10:25 ` [PATCH 6/6] rcusync: Introduce rcu_sync_dtor() Peter Zijlstra
2013-10-08 16:32   ` Paul E. McKenney
2013-10-08 15:27 ` [PATCH 0/6] Optimize the cpu hotplug locking -v2 Oleg Nesterov
2013-10-08 15:38   ` Peter Zijlstra
2013-10-10  5:50 ` Andrew Morton
2013-10-10  6:27   ` Ingo Molnar
2013-10-10  6:34     ` Andrew Morton
2013-10-10  7:27       ` Ingo Molnar
2013-10-10  7:33         ` Andrew Morton
2013-10-10  7:45           ` Ingo Molnar
2013-10-10 12:19   ` Peter Zijlstra
2013-10-10 14:57     ` Ingo Molnar
2013-10-10 15:21       ` Peter Zijlstra
2013-10-10 15:36         ` Oleg Nesterov
2013-10-10 16:50         ` Ingo Molnar
2013-10-10 17:13           ` Paul E. McKenney
2013-10-10 17:35             ` Ingo Molnar
2013-10-10 18:35             ` Peter Zijlstra
2013-10-10 15:26       ` Oleg Nesterov
2013-10-10 16:00         ` Andrew Morton
2013-10-10 16:36           ` Steven Rostedt
2013-10-10 16:43             ` Andrew Morton
2013-10-10 16:53               ` Peter Zijlstra
2013-10-10 17:13                 ` Steven Rostedt
2013-10-10 17:48                   ` Andrew Morton
2013-10-10 18:10                     ` Linus Torvalds
2013-10-10 18:43                       ` Steven Rostedt
2013-10-10 18:50                         ` Peter Zijlstra
2013-10-10 19:15                           ` Paul E. McKenney
2013-10-10 19:00                         ` Linus Torvalds
2013-10-10 18:46                       ` Peter Zijlstra
2013-10-10 18:34                     ` Peter Zijlstra
2013-10-10 18:49                       ` Linus Torvalds
2013-10-10 19:04                         ` Steven Rostedt
2013-10-10 19:16                           ` Linus Torvalds
2013-10-10 19:34                             ` Peter Zijlstra
2013-10-10 19:34                             ` Steven Rostedt
2013-10-11  6:09                             ` Ingo Molnar
2013-10-11 12:38                         ` Peter Zijlstra
2013-10-11 18:25                           ` Oleg Nesterov
2013-10-11 20:48                             ` Peter Zijlstra
2013-10-12 17:06                               ` Oleg Nesterov
2013-10-14  9:05                                 ` Peter Zijlstra
2013-10-14  9:23                                   ` Paul E. McKenney
2013-10-15  1:01                                     ` Paul E. McKenney
2013-10-17 16:49                           ` [tip:sched/core] sched: Remove get_online_cpus() usage tip-bot for Peter Zijlstra
2013-10-10 17:39                 ` [PATCH 0/6] Optimize the cpu hotplug locking -v2 Oleg Nesterov
2013-10-10 16:52           ` Ingo Molnar
2013-10-10 17:44             ` Paul E. McKenney
2013-10-10 16:54           ` Oleg Nesterov
2013-10-10 19:04             ` Srivatsa S. Bhat
2013-10-10 18:52         ` Srivatsa S. Bhat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).