summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-03-25 18:42:07 +0100
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-04-18 20:38:22 +0200
commitdde8da6cffe73dab81aca3855e717e40db35178c (patch)
tree8ba4ae7673a0106448a442033127669d8ea3658c /init
parentsrcu: Crude control of expedited grace periods (diff)
downloadlinux-dde8da6cffe73dab81aca3855e717e40db35178c.tar.xz
linux-dde8da6cffe73dab81aca3855e717e40db35178c.zip
mm: Use static initialization for "srcu"
The MM-notifier code currently dynamically initializes the srcu_struct named "srcu" at subsys_initcall() time, and includes a BUG_ON() to check this initialization in do_mmu_notifier_register(). Unfortunately, there is no foolproof way to verify that an srcu_struct has been initialized, given the possibility of an srcu_struct being allocated on the stack or on the heap. This means that creating an srcu_struct_is_initialized() function is not a reasonable course of action. Nor is peppering do_mmu_notifier_register() with SRCU-specific #ifdefs an attractive alternative. This commit therefore uses DEFINE_STATIC_SRCU() to initialize this srcu_struct at compile time, thus eliminating both the subsys_initcall()-time initialization and the runtime BUG_ON(). Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: <linux-mm@kvack.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Michal Hocko <mhocko@suse.com> Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org> Cc: Vegard Nossum <vegard.nossum@oracle.com>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions