[PATCH v2 tip/core/rcu 03/39] srcu: Consolidate batch checking into rcu_all_batches_empty()

2017-04-17 Thread Paul E. McKenney
The srcu_reschedule() function invokes rcu_batch_empty() on each of the four rcu_batch structures in the srcu_struct in question twice. Given that this check will also be needed in cleanup_srcu_struct(), this commit consolidates these four checks into a new rcu_all_batches_empty() function.

[PATCH v2 tip/core/rcu 30/39] srcu: Improve rcu_seq grace-period-counter abstraction

2017-04-17 Thread Paul E. McKenney
The expedited grace-period code contains several open-coded shifts know the format of an rcu_seq grace-period counter, which is not particularly good style. This commit therefore creates a new rcu_seq_ctr() function that extracts the counter portion of the counter, and an rcu_seq_state() function

[PATCH v2 tip/core/rcu 26/39] rcu: Remove redundant levelcnt[] array from rcu_init_one()

2017-04-17 Thread Paul E. McKenney
The levelcnt[] array is identical to num_rcu_lvl[], so this commit removes levelcnt[]. Signed-off-by: Paul E. McKenney --- kernel/rcu/tree.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index

[PATCH v2 tip/core/rcu 19/39] rcu: Fix warning in rcu_seq_end()

2017-04-17 Thread Paul E. McKenney
From: Dmitry Vyukov The rcu_seq_end() function increments seq signifying completion of a grace period, after that checks that the seq is even and wakes _synchronize_rcu_expedited(). The _synchronize_rcu_expedited() function uses wait_event() to wait for even seq. The

[PATCH v2 tip/core/rcu 32/39] srcu: Merge ->srcu_state into ->srcu_gp_seq

2017-04-17 Thread Paul E. McKenney
Updating ->srcu_state and ->srcu_gp_seq will lead to extremely complex race conditions given multiple callback queues, so this commit takes advantage of the two-bit state now available in rcu_seq counters to store the state in the bottom two bits of ->srcu_gp_seq. Signed-off-by: Paul E. McKenney

[PATCH v2 tip/core/rcu 26/39] rcu: Remove redundant levelcnt[] array from rcu_init_one()

2017-04-17 Thread Paul E. McKenney
The levelcnt[] array is identical to num_rcu_lvl[], so this commit removes levelcnt[]. Signed-off-by: Paul E. McKenney --- kernel/rcu/tree.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 436eaa3047e6..21140192fd76 100644

[PATCH v2 tip/core/rcu 19/39] rcu: Fix warning in rcu_seq_end()

2017-04-17 Thread Paul E. McKenney
From: Dmitry Vyukov The rcu_seq_end() function increments seq signifying completion of a grace period, after that checks that the seq is even and wakes _synchronize_rcu_expedited(). The _synchronize_rcu_expedited() function uses wait_event() to wait for even seq. The problem is that

[PATCH v2 tip/core/rcu 32/39] srcu: Merge ->srcu_state into ->srcu_gp_seq

2017-04-17 Thread Paul E. McKenney
Updating ->srcu_state and ->srcu_gp_seq will lead to extremely complex race conditions given multiple callback queues, so this commit takes advantage of the two-bit state now available in rcu_seq counters to store the state in the bottom two bits of ->srcu_gp_seq. Signed-off-by: Paul E. McKenney

RE: [PATCH] ACPICA: Export mutex functions

2017-04-17 Thread Zheng, Lv
Hi, > From: Guenter Roeck [mailto:li...@roeck-us.net] > Sent: Tuesday, April 18, 2017 3:45 AM > Subject: Re: [PATCH] ACPICA: Export mutex functions > > On Mon, Apr 17, 2017 at 07:27:37PM +, Moore, Robert wrote: > > > > > -Original Message- > > > From: Moore, Robert > > > Sent:

RE: [PATCH] ACPICA: Export mutex functions

2017-04-17 Thread Zheng, Lv
Hi, > From: Guenter Roeck [mailto:li...@roeck-us.net] > Sent: Tuesday, April 18, 2017 3:45 AM > Subject: Re: [PATCH] ACPICA: Export mutex functions > > On Mon, Apr 17, 2017 at 07:27:37PM +, Moore, Robert wrote: > > > > > -Original Message- > > > From: Moore, Robert > > > Sent:

[PATCH v2 tip/core/rcu 18/39] rcu: Expedited wakeups need to be fully ordered

2017-04-17 Thread Paul E. McKenney
Expedited grace periods use workqueue handlers that wake up the requesters, but there is no lock mediating this wakeup. Therefore, memory barriers are required to ensure that the handler's memory references are seen by all to occur before synchronize_*_expedited() returns to its caller. Possibly

[PATCH v2 tip/core/rcu 18/39] rcu: Expedited wakeups need to be fully ordered

2017-04-17 Thread Paul E. McKenney
Expedited grace periods use workqueue handlers that wake up the requesters, but there is no lock mediating this wakeup. Therefore, memory barriers are required to ensure that the handler's memory references are seen by all to occur before synchronize_*_expedited() returns to its caller. Possibly

[PATCH v2 tip/core/rcu 37/39] srcu: Introduce CLASSIC_SRCU Kconfig option

2017-04-17 Thread Paul E. McKenney
The TREE_SRCU rewrite is large and a bit on the non-simple side, so this commit helps reduce risk by allowing the old v4.11 SRCU algorithm to be selected using a new CLASSIC_SRCU Kconfig option that depends on RCU_EXPERT. The default is to use the new TREE_SRCU and TINY_SRCU algorithms, in order

[PATCH v2 tip/core/rcu 37/39] srcu: Introduce CLASSIC_SRCU Kconfig option

2017-04-17 Thread Paul E. McKenney
The TREE_SRCU rewrite is large and a bit on the non-simple side, so this commit helps reduce risk by allowing the old v4.11 SRCU algorithm to be selected using a new CLASSIC_SRCU Kconfig option that depends on RCU_EXPERT. The default is to use the new TREE_SRCU and TINY_SRCU algorithms, in order

[PATCH v2 tip/core/rcu 36/39] srcutorture: Print Tiny SRCU reader statistics

2017-04-17 Thread Paul E. McKenney
The srcu_torture_stats() function is adapted to the specific srcu_struct layout traditionally used by SRCU. This commit therefore adds support for Tiny SRCU. Signed-off-by: Paul E. McKenney --- kernel/rcu/rcutorture.c | 15 +++ 1 file changed, 11

[PATCH v2 tip/core/rcu 36/39] srcutorture: Print Tiny SRCU reader statistics

2017-04-17 Thread Paul E. McKenney
The srcu_torture_stats() function is adapted to the specific srcu_struct layout traditionally used by SRCU. This commit therefore adds support for Tiny SRCU. Signed-off-by: Paul E. McKenney --- kernel/rcu/rcutorture.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff

[PATCH v2 tip/core/rcu 34/39] mm: Use static initialization for "srcu"

2017-04-17 Thread Paul E. McKenney
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

[PATCH v2 tip/core/rcu 34/39] mm: Use static initialization for "srcu"

2017-04-17 Thread Paul E. McKenney
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

[PATCH v2 tip/core/rcu 10/39] rcu: Eliminate flavor scan in rcu_momentary_dyntick_idle()

2017-04-17 Thread Paul E. McKenney
The rcu_momentary_dyntick_idle() function scans the RCU flavors, checking that one of them still needs a quiescent state before doing an expensive atomic operation on the ->dynticks counter. However, this check reduces overhead only after a rare race condition, and increases complexity. This

[PATCH v2 tip/core/rcu 10/39] rcu: Eliminate flavor scan in rcu_momentary_dyntick_idle()

2017-04-17 Thread Paul E. McKenney
The rcu_momentary_dyntick_idle() function scans the RCU flavors, checking that one of them still needs a quiescent state before doing an expensive atomic operation on the ->dynticks counter. However, this check reduces overhead only after a rare race condition, and increases complexity. This

[PATCH v2 tip/core/rcu 21/39] srcu: Move to state-based grace-period sequencing

2017-04-17 Thread Paul E. McKenney
The current SRCU grace-period processing might never reach the last portion of srcu_advance_batches(). This is OK given the current implementation, as the first portion, up to the try_check_zero() following the srcu_flip() is sufficient to drive grace periods forward. However, it has the

[PATCH v2 tip/core/rcu 02/39] rcu: Make arch select smp_mb__after_unlock_lock() strength

2017-04-17 Thread Paul E. McKenney
The definition of smp_mb__after_unlock_lock() is currently smp_mb() for CONFIG_PPC and a no-op otherwise. It would be better to instead provide an architecture-selectable Kconfig option, and select the strength of smp_mb__after_unlock_lock() based on that option. This commit therefore creates

[PATCH v2 tip/core/rcu 22/39] srcu: Add grace-period sequence numbers

2017-04-17 Thread Paul E. McKenney
This commit adds grace-period sequence numbers, which will be used to handle mid-boot grace periods and per-CPU callback lists. Signed-off-by: Paul E. McKenney --- include/linux/srcu.h | 1 + kernel/rcu/srcu.c| 27 +++ 2 files changed, 24

[PATCH v2 tip/core/rcu 29/39] srcu: Fix bogus try_check_zero() comment

2017-04-17 Thread Paul E. McKenney
Signed-off-by: Paul E. McKenney --- kernel/rcu/srcu.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kernel/rcu/srcu.c b/kernel/rcu/srcu.c index d51ab050f777..5aeeaecfb673 100644 --- a/kernel/rcu/srcu.c +++ b/kernel/rcu/srcu.c @@ -254,10

[PATCH v2 tip/core/rcu 21/39] srcu: Move to state-based grace-period sequencing

2017-04-17 Thread Paul E. McKenney
The current SRCU grace-period processing might never reach the last portion of srcu_advance_batches(). This is OK given the current implementation, as the first portion, up to the try_check_zero() following the srcu_flip() is sufficient to drive grace periods forward. However, it has the

[PATCH v2 tip/core/rcu 02/39] rcu: Make arch select smp_mb__after_unlock_lock() strength

2017-04-17 Thread Paul E. McKenney
The definition of smp_mb__after_unlock_lock() is currently smp_mb() for CONFIG_PPC and a no-op otherwise. It would be better to instead provide an architecture-selectable Kconfig option, and select the strength of smp_mb__after_unlock_lock() based on that option. This commit therefore creates

[PATCH v2 tip/core/rcu 22/39] srcu: Add grace-period sequence numbers

2017-04-17 Thread Paul E. McKenney
This commit adds grace-period sequence numbers, which will be used to handle mid-boot grace periods and per-CPU callback lists. Signed-off-by: Paul E. McKenney --- include/linux/srcu.h | 1 + kernel/rcu/srcu.c| 27 +++ 2 files changed, 24 insertions(+), 4

[PATCH v2 tip/core/rcu 29/39] srcu: Fix bogus try_check_zero() comment

2017-04-17 Thread Paul E. McKenney
Signed-off-by: Paul E. McKenney --- kernel/rcu/srcu.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kernel/rcu/srcu.c b/kernel/rcu/srcu.c index d51ab050f777..5aeeaecfb673 100644 --- a/kernel/rcu/srcu.c +++ b/kernel/rcu/srcu.c @@ -254,10 +254,9 @@ static void

[PATCH v2 tip/core/rcu 27/39] srcu: Move rcu_node traversal macros to rcu.h

2017-04-17 Thread Paul E. McKenney
This commit moves rcu_for_each_node_breadth_first(), rcu_for_each_nonleaf_node_breadth_first(), and rcu_for_each_leaf_node() from kernel/rcu/tree.h to kernel/rcu/rcu.h so that SRCU can access them. This commit is code-movement only. Signed-off-by: Paul E. McKenney ---

[PATCH v2 tip/core/rcu 07/39] rcu: Semicolon inside RCU_TRACE() for tree.c

2017-04-17 Thread Paul E. McKenney
The current use of "RCU_TRACE(statement);" can cause odd bugs, especially where "statement" is a local-variable declaration, as it can leave a misplaced ";" in the source code. This commit therefore converts these to "RCU_TRACE(statement;)", which avoids the misplaced ";". Reported-by: Josh

[PATCH v2 tip/core/rcu 39/39] rcu: Make non-preemptive schedule be Tasks RCU quiescent state

2017-04-17 Thread Paul E. McKenney
Currently, a call to schedule() acts as a Tasks RCU quiescent state only if a context switch actually takes place. However, just the call to schedule() guarantees that the calling task has moved off of whatever tracing trampoline that it might have been one previously. This commit therefore

[PATCH v2 tip/core/rcu 35/39] srcu: Create a tiny SRCU

2017-04-17 Thread Paul E. McKenney
In response to automated complaints about modifications to SRCU increasing its size, this commit creates a tiny SRCU that is used in SMP=n && PREEMPT=n builds. Signed-off-by: Paul E. McKenney --- include/linux/srcu.h | 69 ++-

[PATCH v2 tip/core/rcu 27/39] srcu: Move rcu_node traversal macros to rcu.h

2017-04-17 Thread Paul E. McKenney
This commit moves rcu_for_each_node_breadth_first(), rcu_for_each_nonleaf_node_breadth_first(), and rcu_for_each_leaf_node() from kernel/rcu/tree.h to kernel/rcu/rcu.h so that SRCU can access them. This commit is code-movement only. Signed-off-by: Paul E. McKenney --- kernel/rcu/rcu.h | 35

[PATCH v2 tip/core/rcu 07/39] rcu: Semicolon inside RCU_TRACE() for tree.c

2017-04-17 Thread Paul E. McKenney
The current use of "RCU_TRACE(statement);" can cause odd bugs, especially where "statement" is a local-variable declaration, as it can leave a misplaced ";" in the source code. This commit therefore converts these to "RCU_TRACE(statement;)", which avoids the misplaced ";". Reported-by: Josh

[PATCH v2 tip/core/rcu 39/39] rcu: Make non-preemptive schedule be Tasks RCU quiescent state

2017-04-17 Thread Paul E. McKenney
Currently, a call to schedule() acts as a Tasks RCU quiescent state only if a context switch actually takes place. However, just the call to schedule() guarantees that the calling task has moved off of whatever tracing trampoline that it might have been one previously. This commit therefore

[PATCH v2 tip/core/rcu 35/39] srcu: Create a tiny SRCU

2017-04-17 Thread Paul E. McKenney
In response to automated complaints about modifications to SRCU increasing its size, this commit creates a tiny SRCU that is used in SMP=n && PREEMPT=n builds. Signed-off-by: Paul E. McKenney --- include/linux/srcu.h | 69 ++- include/linux/srcutiny.h | 81 ++

[PATCH v2 tip/core/rcu 20/39] srcu: Push srcu_advance_batches() fastpath into common case

2017-04-17 Thread Paul E. McKenney
This commit simplifies the SRCU state machine by pushing the srcu_advance_batches() idle-SRCU fastpath into the common case. This is done by giving srcu_reschedule() a delay parameter, which is zero in the call from srcu_advance_batches(). This commit is a step towards numbering callbacks in

[PATCH v2 tip/core/rcu 20/39] srcu: Push srcu_advance_batches() fastpath into common case

2017-04-17 Thread Paul E. McKenney
This commit simplifies the SRCU state machine by pushing the srcu_advance_batches() idle-SRCU fastpath into the common case. This is done by giving srcu_reschedule() a delay parameter, which is zero in the call from srcu_advance_batches(). This commit is a step towards numbering callbacks in

[PATCH v2 tip/core/rcu 16/39] rcu: Add single-element dequeue functions to rcu_segcblist

2017-04-17 Thread Paul E. McKenney
This commit adds single-element dequeue functions to rcu_segcblist. These are less efficient than using the extract and insert functions, but allow more precise debugging code. These functions are thus expected to be used only in debug builds, for example, CONFIG_PROVE_RCU. Signed-off-by: Paul

[PATCH v2 tip/core/rcu 24/39] srcu: Move combining-tree definitions for SRCU's benefit

2017-04-17 Thread Paul E. McKenney
This commit moves the C preprocessor code that defines the default shape of the rcu_node combining tree to a new include/linux/rcu_node_tree.h file as a first step towards enabling SRCU to create its own combining tree, which in turn enables SRCU to implement per-CPU callback handling, thus

[PATCH v2 tip/core/rcu 16/39] rcu: Add single-element dequeue functions to rcu_segcblist

2017-04-17 Thread Paul E. McKenney
This commit adds single-element dequeue functions to rcu_segcblist. These are less efficient than using the extract and insert functions, but allow more precise debugging code. These functions are thus expected to be used only in debug builds, for example, CONFIG_PROVE_RCU. Signed-off-by: Paul

[PATCH v2 tip/core/rcu 24/39] srcu: Move combining-tree definitions for SRCU's benefit

2017-04-17 Thread Paul E. McKenney
This commit moves the C preprocessor code that defines the default shape of the rcu_node combining tree to a new include/linux/rcu_node_tree.h file as a first step towards enabling SRCU to create its own combining tree, which in turn enables SRCU to implement per-CPU callback handling, thus

[PATCH v2 tip/core/rcu 23/39] srcu: Use rcu_segcblist to track SRCU callbacks

2017-04-17 Thread Paul E. McKenney
This commit switches SRCU from custom-built callback queues to the new rcu_segcblist structure. This change associates grace-period sequence numbers with groups of callbacks, which will be needed for efficient processing of per-CPU callbacks. Signed-off-by: Paul E. McKenney

[PATCH v2 tip/core/rcu 25/39] srcu: Move rcu_init_levelspread() to rcu_tree_node.h

2017-04-17 Thread Paul E. McKenney
This commit moves the rcu_init_levelspread() function from kernel/rcu/tree.c to kernel/rcu/rcu.h so that SRCU can access it. This is another step towards enabling SRCU to create its own combining tree. This commit is code-movement only, give or take knock-on adjustments. Signed-off-by: Paul E.

[PATCH v2 tip/core/rcu 25/39] srcu: Move rcu_init_levelspread() to rcu_tree_node.h

2017-04-17 Thread Paul E. McKenney
This commit moves the rcu_init_levelspread() function from kernel/rcu/tree.c to kernel/rcu/rcu.h so that SRCU can access it. This is another step towards enabling SRCU to create its own combining tree. This commit is code-movement only, give or take knock-on adjustments. Signed-off-by: Paul E.

[PATCH v2 tip/core/rcu 23/39] srcu: Use rcu_segcblist to track SRCU callbacks

2017-04-17 Thread Paul E. McKenney
This commit switches SRCU from custom-built callback queues to the new rcu_segcblist structure. This change associates grace-period sequence numbers with groups of callbacks, which will be needed for efficient processing of per-CPU callbacks. Signed-off-by: Paul E. McKenney ---

[PATCH v2 tip/core/rcu 12/39] rcu: Default RCU_FANOUT_LEAF to 16 unless explicitly changed

2017-04-17 Thread Paul E. McKenney
If the RCU_EXPERT Kconfig option is not set (the default), then the RCU_FANOUT_LEAF Kconfig option will not be defined, which will cause the leaf-level rcu_node tree fanout to default to 32 on 32-bit systems and 64 on 64-bit systems. This can result in excessive lock contention. This commit

[PATCH v2 tip/core/rcu 33/39] srcu: Crude control of expedited grace periods

2017-04-17 Thread Paul E. McKenney
SRCU's implementation of expedited grace periods has always assumed that the SRCU instance is idle when the expedited request arrives. This commit improves this a bit by maintaining a count of the number of outstanding expedited requests, thus allowing prior non-expedited grace periods accommodate

[PATCH v2 tip/core/rcu 06/39] rcu: Semicolon inside RCU_TRACE() for Tiny RCU

2017-04-17 Thread Paul E. McKenney
The current use of "RCU_TRACE(statement);" can cause odd bugs, especially where "statement" is a local-variable declaration, as it can leave a misplaced ";" in the source code. This commit therefore converts these to "RCU_TRACE(statement;)", which avoids the misplaced ";". Reported-by: Josh

[PATCH v2 tip/core/rcu 12/39] rcu: Default RCU_FANOUT_LEAF to 16 unless explicitly changed

2017-04-17 Thread Paul E. McKenney
If the RCU_EXPERT Kconfig option is not set (the default), then the RCU_FANOUT_LEAF Kconfig option will not be defined, which will cause the leaf-level rcu_node tree fanout to default to 32 on 32-bit systems and 64 on 64-bit systems. This can result in excessive lock contention. This commit

[PATCH v2 tip/core/rcu 33/39] srcu: Crude control of expedited grace periods

2017-04-17 Thread Paul E. McKenney
SRCU's implementation of expedited grace periods has always assumed that the SRCU instance is idle when the expedited request arrives. This commit improves this a bit by maintaining a count of the number of outstanding expedited requests, thus allowing prior non-expedited grace periods accommodate

[PATCH v2 tip/core/rcu 06/39] rcu: Semicolon inside RCU_TRACE() for Tiny RCU

2017-04-17 Thread Paul E. McKenney
The current use of "RCU_TRACE(statement);" can cause odd bugs, especially where "statement" is a local-variable declaration, as it can leave a misplaced ";" in the source code. This commit therefore converts these to "RCU_TRACE(statement;)", which avoids the misplaced ";". Reported-by: Josh

[PATCH v2 tip/core/rcu 38/39] srcu: Parallelize callback handling

2017-04-17 Thread Paul E. McKenney
Peter Zijlstra proposed using SRCU to reduce mmap_sem contention [1,2], however, there are workloads that could result in a high volume of concurrent invocations of call_srcu(), which with current SRCU would result in excessive lock contention on the srcu_struct structure's ->queue_lock, which

[PATCH v2 tip/core/rcu 38/39] srcu: Parallelize callback handling

2017-04-17 Thread Paul E. McKenney
Peter Zijlstra proposed using SRCU to reduce mmap_sem contention [1,2], however, there are workloads that could result in a high volume of concurrent invocations of call_srcu(), which with current SRCU would result in excessive lock contention on the srcu_struct structure's ->queue_lock, which

[PATCH v2 tip/core/rcu 14/39] srcu: Allow SRCU to access rcu_scheduler_active

2017-04-17 Thread Paul E. McKenney
This is primarily a code-movement commit in preparation for allowing SRCU to handle early-boot SRCU grace periods. Signed-off-by: Paul E. McKenney --- include/linux/rcutiny.h | 6 +++--- kernel/rcu/tiny_plugin.h | 9 + kernel/rcu/tree.c| 2 +-

[PATCH v2 tip/core/rcu 14/39] srcu: Allow SRCU to access rcu_scheduler_active

2017-04-17 Thread Paul E. McKenney
This is primarily a code-movement commit in preparation for allowing SRCU to handle early-boot SRCU grace periods. Signed-off-by: Paul E. McKenney --- include/linux/rcutiny.h | 6 +++--- kernel/rcu/tiny_plugin.h | 9 + kernel/rcu/tree.c| 2 +- kernel/rcu/tree_exp.h| 12

[PATCH v2 tip/core/rcu 31/39] srcu: Allow a second bit in rcu_seq for SRCU state

2017-04-17 Thread Paul E. McKenney
This commit increases the number of reserved bits at the bottom of an rcu_seq grace-period counter from one to two, as will be needed to accommodate SRCU's three-state grace periods. Signed-off-by: Paul E. McKenney --- kernel/rcu/rcu.h | 2 +- 1 file changed, 1

[PATCH v2 tip/core/rcu 05/39] rcu: Semicolon inside RCU_TRACE() for rcu.h

2017-04-17 Thread Paul E. McKenney
The current use of "RCU_TRACE(statement);" can cause odd bugs, especially where "statement" is a local-variable declaration, as it can leave a misplaced ";" in the source code. This commit therefore converts these to "RCU_TRACE(statement;)", which avoids the misplaced ";". Reported-by: Josh

[PATCH v2 tip/core/rcu 05/39] rcu: Semicolon inside RCU_TRACE() for rcu.h

2017-04-17 Thread Paul E. McKenney
The current use of "RCU_TRACE(statement);" can cause odd bugs, especially where "statement" is a local-variable declaration, as it can leave a misplaced ";" in the source code. This commit therefore converts these to "RCU_TRACE(statement;)", which avoids the misplaced ";". Reported-by: Josh

[PATCH v2 tip/core/rcu 31/39] srcu: Allow a second bit in rcu_seq for SRCU state

2017-04-17 Thread Paul E. McKenney
This commit increases the number of reserved bits at the bottom of an rcu_seq grace-period counter from one to two, as will be needed to accommodate SRCU's three-state grace periods. Signed-off-by: Paul E. McKenney --- kernel/rcu/rcu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v2 tip/core/rcu 0/40] SRCU callback parallelization for 4.12

2017-04-17 Thread Paul E. McKenney
Hello! This v2 series moves SRCU from its traditional single per-srcu_struct callback queue to per-srcu_struct/per-CPU callback queues. This involves abstracting functionality from Tree RCU, which results in a large conflict footprint, which in turn results in some otherwise unrelated patches

[PATCH v2 tip/core/rcu 0/40] SRCU callback parallelization for 4.12

2017-04-17 Thread Paul E. McKenney
Hello! This v2 series moves SRCU from its traditional single per-srcu_struct callback queue to per-srcu_struct/per-CPU callback queues. This involves abstracting functionality from Tree RCU, which results in a large conflict footprint, which in turn results in some otherwise unrelated patches

[PATCH v2 tip/core/rcu 15/39] srcu: Allow early boot use of synchronize_srcu()

2017-04-17 Thread Paul E. McKenney
This commit checks for pre-scheduler state, and if that early in the boot process, synchronize_srcu() and friends are no-ops. Signed-off-by: Paul E. McKenney --- kernel/rcu/srcu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/rcu/srcu.c

[PATCH v2 tip/core/rcu 15/39] srcu: Allow early boot use of synchronize_srcu()

2017-04-17 Thread Paul E. McKenney
This commit checks for pre-scheduler state, and if that early in the boot process, synchronize_srcu() and friends are no-ops. Signed-off-by: Paul E. McKenney --- kernel/rcu/srcu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/rcu/srcu.c b/kernel/rcu/srcu.c index

RE: [PATCH] ACPICA: Export mutex functions

2017-04-17 Thread Zheng, Lv
Hi, > -Original Message- > From: Moore, Robert > Sent: Tuesday, April 18, 2017 3:28 AM > To: 'Guenter Roeck' ; Zheng, Lv > Cc: Wysocki, Rafael J ; 'Len Brown' > ; 'linux- > a...@vger.kernel.org'

RE: [PATCH] ACPICA: Export mutex functions

2017-04-17 Thread Zheng, Lv
Hi, > -Original Message- > From: Moore, Robert > Sent: Tuesday, April 18, 2017 3:28 AM > To: 'Guenter Roeck' ; Zheng, Lv > Cc: Wysocki, Rafael J ; 'Len Brown' > ; 'linux- > a...@vger.kernel.org' ; 'de...@acpica.org' > ; 'linux- > ker...@vger.kernel.org' ; Box, David E > > Subject:

RE: [PATCH] ACPICA: Export mutex functions

2017-04-17 Thread Zheng, Lv
Hi, > From: Guenter Roeck [mailto:li...@roeck-us.net] > Subject: Re: [PATCH] ACPICA: Export mutex functions > > Hi, > > On Mon, Apr 17, 2017 at 09:39:35AM +, Zheng, Lv wrote: > > Hi, > > > > > From: Guenter Roeck [mailto:li...@roeck-us.net] > > > Subject: Re: [PATCH] ACPICA: Export mutex

RE: [PATCH] ACPICA: Export mutex functions

2017-04-17 Thread Zheng, Lv
Hi, > From: Guenter Roeck [mailto:li...@roeck-us.net] > Subject: Re: [PATCH] ACPICA: Export mutex functions > > Hi, > > On Mon, Apr 17, 2017 at 09:39:35AM +, Zheng, Lv wrote: > > Hi, > > > > > From: Guenter Roeck [mailto:li...@roeck-us.net] > > > Subject: Re: [PATCH] ACPICA: Export mutex

RE: [PATCH] ACPICA: Export mutex functions

2017-04-17 Thread Zheng, Lv
Hi, > From: linux-acpi-ow...@vger.kernel.org > [mailto:linux-acpi-ow...@vger.kernel.org] On Behalf Of Guenter > Roeck > Subject: Re: [PATCH] ACPICA: Export mutex functions > > On 04/17/2017 02:48 AM, Zheng, Lv wrote: > > Hi, > > > >> From: Devel [mailto:devel-boun...@acpica.org] On Behalf Of

RE: [PATCH] ACPICA: Export mutex functions

2017-04-17 Thread Zheng, Lv
Hi, > From: linux-acpi-ow...@vger.kernel.org > [mailto:linux-acpi-ow...@vger.kernel.org] On Behalf Of Guenter > Roeck > Subject: Re: [PATCH] ACPICA: Export mutex functions > > On 04/17/2017 02:48 AM, Zheng, Lv wrote: > > Hi, > > > >> From: Devel [mailto:devel-boun...@acpica.org] On Behalf Of

[PATCH v2 tip/core/rcu 09/11] rcu: Use bool value directly

2017-04-17 Thread Paul E. McKenney
From: Nicholas Mc Guire The beenonline variable is declared bool so there is no need for an explicit comparison, especially not against the constant zero. Signed-off-by: Nicholas Mc Guire Signed-off-by: Paul E. McKenney ---

[PATCH v2 tip/core/rcu 09/11] rcu: Use bool value directly

2017-04-17 Thread Paul E. McKenney
From: Nicholas Mc Guire The beenonline variable is declared bool so there is no need for an explicit comparison, especially not against the constant zero. Signed-off-by: Nicholas Mc Guire Signed-off-by: Paul E. McKenney --- kernel/rcu/tree.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v2 tip/core/rcu 08/11] torture: Use correct path for Kconfig fragment for duplicates

2017-04-17 Thread Paul E. McKenney
Currently, the rcutorture scripting will give an error message if running a duplicate scenario that happens also to have a non-existent build directory (b1, b2, ... in the rcutorture directory). Worse yet, if the build directory has already been created and used for a real build, the script will

[PATCH v2 tip/core/rcu 08/11] torture: Use correct path for Kconfig fragment for duplicates

2017-04-17 Thread Paul E. McKenney
Currently, the rcutorture scripting will give an error message if running a duplicate scenario that happens also to have a non-existent build directory (b1, b2, ... in the rcutorture directory). Worse yet, if the build directory has already been created and used for a real build, the script will

[PATCH] drm/cma: Fix recent regression of mmap() in the MMU case.

2017-04-17 Thread Eric Anholt
The stub get_unmapped_area() function was actually getting called, so all of our mmap()s failed. Cc: Yannick Fertre Fixes: 97bf3a9aa60f ("drm/cma: Update DEFINE_DRM_GEM_CMA_FOPS to add get_unmapped_area") Signed-off-by: Eric Anholt ---

[PATCH] drm/cma: Fix recent regression of mmap() in the MMU case.

2017-04-17 Thread Eric Anholt
The stub get_unmapped_area() function was actually getting called, so all of our mmap()s failed. Cc: Yannick Fertre Fixes: 97bf3a9aa60f ("drm/cma: Update DEFINE_DRM_GEM_CMA_FOPS to add get_unmapped_area") Signed-off-by: Eric Anholt --- include/drm/drm_gem_cma_helper.h | 18 --

[PATCH v2 tip/core/rcu 04/11] rcu: Make RCU_FANOUT_LEAF help text more explicit about skew_tick

2017-04-17 Thread Paul E. McKenney
If you set RCU_FANOUT_LEAF too high, you can get lock contention on the leaf rcu_node, and you should boot with the skew_tick kernel parameter set in order to avoid this lock contention. This commit therefore upgrades the RCU_FANOUT_LEAF help text to explicitly state this. Signed-off-by: Paul E.

[PATCH v2 tip/core/rcu 04/11] rcu: Make RCU_FANOUT_LEAF help text more explicit about skew_tick

2017-04-17 Thread Paul E. McKenney
If you set RCU_FANOUT_LEAF too high, you can get lock contention on the leaf rcu_node, and you should boot with the skew_tick kernel parameter set in order to avoid this lock contention. This commit therefore upgrades the RCU_FANOUT_LEAF help text to explicitly state this. Signed-off-by: Paul E.

[PATCH v2 tip/core/rcu 05/11] rcu: Remove obsolete comment from rcu_future_gp_cleanup() header

2017-04-17 Thread Paul E. McKenney
The rcu_nocb_gp_cleanup() function is now invoked elsewhere, so this commit drags this comment into the year 2017. Reported-by: Michalis Kokologiannakis Signed-off-by: Paul E. McKenney --- kernel/rcu/tree.c | 4 +--- 1 file changed, 1

[PATCH v2 tip/core/rcu 05/11] rcu: Remove obsolete comment from rcu_future_gp_cleanup() header

2017-04-17 Thread Paul E. McKenney
The rcu_nocb_gp_cleanup() function is now invoked elsewhere, so this commit drags this comment into the year 2017. Reported-by: Michalis Kokologiannakis Signed-off-by: Paul E. McKenney --- kernel/rcu/tree.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git

[PATCH v2 tip/core/rcu 01/11] mm: Rename SLAB_DESTROY_BY_RCU to SLAB_TYPESAFE_BY_RCU

2017-04-17 Thread Paul E. McKenney
A group of Linux kernel hackers reported chasing a bug that resulted from their assumption that SLAB_DESTROY_BY_RCU provided an existence guarantee, that is, that no block from such a slab would be reallocated during an RCU read-side critical section. Of course, that is not the case. Instead,

[PATCH v2 tip/core/rcu 01/11] mm: Rename SLAB_DESTROY_BY_RCU to SLAB_TYPESAFE_BY_RCU

2017-04-17 Thread Paul E. McKenney
A group of Linux kernel hackers reported chasing a bug that resulted from their assumption that SLAB_DESTROY_BY_RCU provided an existence guarantee, that is, that no block from such a slab would be reallocated during an RCU read-side critical section. Of course, that is not the case. Instead,

[PATCH v2 tip/core/rcu 07/11] rcu: Improve comments for hotplug/suspend/hibernate functions

2017-04-17 Thread Paul E. McKenney
Signed-off-by: Paul E. McKenney --- kernel/rcu/tree.c | 41 + 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index bdaa69d23a8a..c4f195dd7c94 100644 --- a/kernel/rcu/tree.c

[PATCH v2 tip/core/rcu 07/11] rcu: Improve comments for hotplug/suspend/hibernate functions

2017-04-17 Thread Paul E. McKenney
Signed-off-by: Paul E. McKenney --- kernel/rcu/tree.c | 41 + 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index bdaa69d23a8a..c4f195dd7c94 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@

[PATCH v2 tip/core/rcu 10/11] rcu: Use true/false in assignment to bool

2017-04-17 Thread Paul E. McKenney
From: Nicholas Mc Guire This commit makes the parse_rcu_nocb_poll() function assign true (rather than the constant 1) to the bool variable rcu_nocb_poll. Signed-off-by: Nicholas Mc Guire Signed-off-by: Paul E. McKenney ---

[PATCH v2 tip/core/rcu 02/11] lockdep: Use "WARNING" tag on lockdep splats

2017-04-17 Thread Paul E. McKenney
This commit changes lockdep splats to begin lines with "WARNING" and to use pr_warn() instead of printk(). This change eases scripted analysis of kernel console output. Reported-by: Dmitry Vyukov Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney

[PATCH v2 tip/core/rcu 10/11] rcu: Use true/false in assignment to bool

2017-04-17 Thread Paul E. McKenney
From: Nicholas Mc Guire This commit makes the parse_rcu_nocb_poll() function assign true (rather than the constant 1) to the bool variable rcu_nocb_poll. Signed-off-by: Nicholas Mc Guire Signed-off-by: Paul E. McKenney --- kernel/rcu/tree_plugin.h | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v2 tip/core/rcu 02/11] lockdep: Use "WARNING" tag on lockdep splats

2017-04-17 Thread Paul E. McKenney
This commit changes lockdep splats to begin lines with "WARNING" and to use pr_warn() instead of printk(). This change eases scripted analysis of kernel console output. Reported-by: Dmitry Vyukov Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney Acked-by: Dmitry Vyukov ---

[PATCH v2 tip/core/rcu 03/11] types: Update obsolete callback_head comment

2017-04-17 Thread Paul E. McKenney
The comment header for callback_head (and thus for rcu_head) states that the bottom two bits of a pointer to these structures must be zero. This is obsolete: The new requirement is that only the bottom bit need be zero. This commit therefore updates this comment. Signed-off-by: Paul E.

[PATCH v2 tip/core/rcu 03/11] types: Update obsolete callback_head comment

2017-04-17 Thread Paul E. McKenney
The comment header for callback_head (and thus for rcu_head) states that the bottom two bits of a pointer to these structures must be zero. This is obsolete: The new requirement is that only the bottom bit need be zero. This commit therefore updates this comment. Signed-off-by: Paul E.

[PATCH v2 tip/core/rcu 06/11] hlist_add_tail_rcu disable sparse warning

2017-04-17 Thread Paul E. McKenney
From: "Michael S. Tsirkin" sparse is unhappy about this code in hlist_add_tail_rcu: struct hlist_node *i, *last = NULL; for (i = hlist_first_rcu(h); i; i = hlist_next_rcu(i)) last = i; This is because hlist_next_rcu and hlist_next_rcu return

[PATCH v2 tip/core/rcu 11/11] rcu: Fix typo in PER_RCU_NODE_PERIOD header comment

2017-04-17 Thread Paul E. McKenney
This commit just changes a "the the" to "the" to reduce repetition. Reported-by: Michalis Kokologiannakis Signed-off-by: Paul E. McKenney --- kernel/rcu/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/tree.c

[PATCH v2 tip/core/rcu 06/11] hlist_add_tail_rcu disable sparse warning

2017-04-17 Thread Paul E. McKenney
From: "Michael S. Tsirkin" sparse is unhappy about this code in hlist_add_tail_rcu: struct hlist_node *i, *last = NULL; for (i = hlist_first_rcu(h); i; i = hlist_next_rcu(i)) last = i; This is because hlist_next_rcu and hlist_next_rcu return __rcu pointers.

[PATCH v2 tip/core/rcu 11/11] rcu: Fix typo in PER_RCU_NODE_PERIOD header comment

2017-04-17 Thread Paul E. McKenney
This commit just changes a "the the" to "the" to reduce repetition. Reported-by: Michalis Kokologiannakis Signed-off-by: Paul E. McKenney --- kernel/rcu/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index

[PATCH v2 tip/core/rcu 0/13] Miscellaneous fixes for 4.12

2017-04-17 Thread Paul E. McKenney
Hello! This v2 series contains the following fixes: 1. Rename SLAB_DESTROY_BY_RCU to SLAB_TYPESAFE_BY_RCU. 2. Use "WARNING" tag on RCU's lockdep splats. 3. Update obsolete callback_head comment. 4. Make RCU_FANOUT_LEAF help text more explicit about skew_tick. 5.

[PATCH v2 tip/core/rcu 0/13] Miscellaneous fixes for 4.12

2017-04-17 Thread Paul E. McKenney
Hello! This v2 series contains the following fixes: 1. Rename SLAB_DESTROY_BY_RCU to SLAB_TYPESAFE_BY_RCU. 2. Use "WARNING" tag on RCU's lockdep splats. 3. Update obsolete callback_head comment. 4. Make RCU_FANOUT_LEAF help text more explicit about skew_tick. 5.

Re: [PATCH v8] nvme: improve performance for virtual NVMe devices

2017-04-17 Thread Helen Koike
On 2017-04-17 08:01 PM, Keith Busch wrote: On Fri, Apr 14, 2017 at 03:10:30PM -0300, Helen Koike wrote: + Add missing maintainers from scripts/get_maintainer.pl in the email thread Hi, I would like to know if it would be possible to get this patch for kernel 4.12. Should I send a pull

Re: [PATCH v8] nvme: improve performance for virtual NVMe devices

2017-04-17 Thread Helen Koike
On 2017-04-17 08:01 PM, Keith Busch wrote: On Fri, Apr 14, 2017 at 03:10:30PM -0300, Helen Koike wrote: + Add missing maintainers from scripts/get_maintainer.pl in the email thread Hi, I would like to know if it would be possible to get this patch for kernel 4.12. Should I send a pull

Re: [PATCH 0/1] x86/cqm: Cqm3 Design Documentation

2017-04-17 Thread Shivappa Vikas
Hello Thomas, Wanted to know if you had any feedback on the new interface for cqm design which is based on monitoring the resctrl groups. It tries to address all the requirements discussed in : https://marc.info/?l=linux-kernel=148891934720489 -basically to monitor resctrl groups / per

Re: [PATCH 0/1] x86/cqm: Cqm3 Design Documentation

2017-04-17 Thread Shivappa Vikas
Hello Thomas, Wanted to know if you had any feedback on the new interface for cqm design which is based on monitoring the resctrl groups. It tries to address all the requirements discussed in : https://marc.info/?l=linux-kernel=148891934720489 -basically to monitor resctrl groups / per

<    1   2   3   4   5   6   7   8   9   10   >