- 09 Feb, 2019 15 commits
-
-
Paul E. McKenney authored
Replace the license boiler plate with a SPDX license identifier. While in the area, update an email address. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com> [ paulmck: Update .h SPDX format per Joe Perches. ] Reviewed-by:
Thomas Gleixner <tglx@linutronix.de>
-
Paul E. McKenney authored
Replace the license boiler plate with a SPDX license identifier. While in the area, update an email address. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com> [ paulmck: Update .h SPDX format per Joe Perches. ] Reviewed-by:
Thomas Gleixner <tglx@linutronix.de>
-
Paul E. McKenney authored
Replace the license boiler plate with a SPDX license identifier. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com> [ paulmck: Update .h SPDX format per Joe Perches. ] Reviewed-by:
Thomas Gleixner <tglx@linutronix.de>
-
Paul E. McKenney authored
Replace the license boiler plate with a SPDX license identifier. While in the area, update an email address. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com> [ paulmck: Update .h SPDX format per Joe Perches. ] Reviewed-by:
Thomas Gleixner <tglx@linutronix.de>
-
Paul E. McKenney authored
Replace the license boiler plate with a SPDX license identifier. While in the area, update an email address. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com> [ paulmck: Update .h SPDX format per Joe Perches. ] Reviewed-by:
Thomas Gleixner <tglx@linutronix.de>
-
Paul E. McKenney authored
Replace the license boiler plate with a SPDX license identifier. While in the area, update an email address. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com> [ paulmck: Update .h SPDX comment format per Joe Perches. ] Reviewed-by:
Thomas Gleixner <tglx@linutronix.de>
-
Paul E. McKenney authored
Replace the license boiler plate with a SPDX license identifier. While in the area, update an email address. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com> Reviewed-by:
Thomas Gleixner <tglx@linutronix.de>
-
Paul E. McKenney authored
Replace the license boiler plate with a SPDX license identifier. While in the area, update an email address. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com> [ paulmck: Update .h file SPDX comment format per Joe Perches. ] Reviewed-by:
Thomas Gleixner <tglx@linutronix.de>
-
Paul E. McKenney authored
Replace the license boiler plate with a SPDX license identifier. While in the area, update an email address. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com> Reviewed-by:
Thomas Gleixner <tglx@linutronix.de>
-
Paul E. McKenney authored
Replace the license boiler plate with a SPDX license identifier. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com> Reviewed-by:
Thomas Gleixner <tglx@linutronix.de>
-
Paul E. McKenney authored
Replace the license boiler plate with a SPDX license identifier. While in the area, update an email address. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com> Reviewed-by:
Thomas Gleixner <tglx@linutronix.de>
-
Paul E. McKenney authored
Replace the license boiler plate with a SPDX license identifier. While in the area, update an email address. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com> Reviewed-by:
Thomas Gleixner <tglx@linutronix.de>
-
Paul E. McKenney authored
Replace the license boiler plate with a SPDX license identifier. While in the area, update an email address. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com> Reviewed-by:
Thomas Gleixner <tglx@linutronix.de>
-
Paul E. McKenney authored
Replace the license boiler plate with a SPDX license identifier. While in the area, update an email address. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com> Reviewed-by:
Thomas Gleixner <tglx@linutronix.de>
-
Paul E. McKenney authored
Replace the license boiler plate with a SPDX license identifier. While in the area, update an email address. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com> Reviewed-by:
Thomas Gleixner <tglx@linutronix.de>
-
- 25 Jan, 2019 25 commits
-
-
Paul E. McKenney authored
consolidate.2019.01.26a: RCU flavor consolidation cleanups. fwd.2019.01.26a: RCU grace-period forward-progress fixes.
-
Zhang, Jun authored
Currently, __note_gp_changes() checks to see if the rcu_node structure's ->gp_seq_needed is greater than or equal to that of the rcu_data structure, and if so, updates the rcu_data structure's ->gp_seq_needed field. This results in a useless store in the case where the two fields are equal. This commit therefore carries out this store only in the case where the rcu_node structure's ->gp_seq_needed is strictly greater than that of the rcu_data structure. Signed-off-by:
"Zhang, Jun" <jun.zhang@intel.com> Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com> Link: https://lkml.kernel.org/r/88DC34334CA3444C85D647DBFA962C2735AD5F77@SHSMSX104.ccr.corp.intel.com
-
Zhang, Jun authored
The rcu_gp_kthread_wake() function is invoked when it might be necessary to wake the RCU grace-period kthread. Because self-wakeups are normally a useless waste of CPU cycles, if rcu_gp_kthread_wake() is invoked from this kthread, it naturally refuses to do the wakeup. Unfortunately, natural though it might be, this heuristic fails when rcu_gp_kthread_wake() is invoked from an interrupt or softirq handler that interrupted the grace-period kthread just after the final check of the wait-event condition but just before the schedule() call. In this case, a wakeup is required, even though the call to rcu_gp_kthread_wake() is within the RCU grace-period kthread's context. Failing to provide this wakeup can result in grace periods failing to start, which in turn results in out-of-memory conditions. This race window is quite narrow, but it actually did happen during real testing. It would of course need to be fixed even if it was strictly theoretical in nature. This patch does not Cc stable because it does not apply cleanly to earlier kernel versions. Fixes: 48a7639c ("rcu: Make callers awaken grace-period kthread") Reported-by:
"He, Bo" <bo.he@intel.com> Co-developed-by:
"Zhang, Jun" <jun.zhang@intel.com> Co-developed-by:
"He, Bo" <bo.he@intel.com> Co-developed-by:
"xiao, jin" <jin.xiao@intel.com> Co-developed-by:
Bai, Jie A <jie.a.bai@intel.com> Signed-off: "Zhang, Jun" <jun.zhang@intel.com> Signed-off: "He, Bo" <bo.he@intel.com> Signed-off: "xiao, jin" <jin.xiao@intel.com> Signed-off: Bai, Jie A <jie.a.bai@intel.com> Signed-off-by:
"Zhang, Jun" <jun.zhang@intel.com> [ paulmck: Switch from !in_softirq() to "!in_interrupt() && !in_serving_softirq() to avoid redundant wakeups and to also handle the interrupt-handler scenario as well as the softirq-handler scenario that actually occurred in testing. ] Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com> Link: https://lkml.kernel.org/r/CD6925E8781EFD4D8E11882D20FC406D52A11F61@SHSMSX104.ccr.corp.intel.com
-
Paul E. McKenney authored
Life is hard if RCU manages to get stuck without triggering RCU CPU stall warnings or triggering the rcu_check_gp_start_stall() checks for failing to start a grace period. This commit therefore adds a boot-time-selectable sysrq key (commandeering "y") that allows manually dumping Tree RCU state. The new rcutree.sysrq_rcu kernel boot parameter must be set for this sysrq to be available. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com>
-
Paul E. McKenney authored
The rcu_check_gp_kthread_starvation() function can be invoked without holding locks, so the access to the rcu_state structure's ->gp_flags field must be protected with READ_ONCE(). This commit therefore adds this protection. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com>
-
Paul E. McKenney authored
If a grace period fails to start (for example, because you commented out the last two lines of rcu_accelerate_cbs_unlocked()), rcu_core() will invoke rcu_check_gp_start_stall(), which will notice and complain. However, this complaint is lacking crucial debugging information such as when the last wakeup executed and what the value of ->gp_seq was at that time. This commit therefore removes the current pr_alert() from rcu_check_gp_start_stall(), instead invoking show_rcu_gp_kthreads(), which has been updated to print the needed information, which is collected by rcu_gp_kthread_wake(). Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com>
-
Paul E. McKenney authored
This commit updates a few obsolete comments in the RCU callback-offload code. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com>
-
Paul E. McKenney authored
The rcu_cpu_kthread_cpu used to provide debugfs information, but is no longer used. This commit therefore removes it. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com>
-
Paul E. McKenney authored
Given that RCU has a perfectly good per-CPU rcu_data structure, most per-CPU quantities should be stored there. This commit therefore moves the rcu_cpu_has_work per-CPU variable to the rcu_data structure. This also makes this variable unconditionally present, which should be acceptable given the memory reduction due to the RCU flavor consolidation and also due to simplifications this will enable. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com>
-
Paul E. McKenney authored
The rcu_cpu_kthread_loops variable used to provide debugfs information, but is no longer used. This commit therefore removes it. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com>
-
Paul E. McKenney authored
Given that RCU has a perfectly good per-CPU rcu_data structure, most per-CPU quantities should be stored there. This commit therefore moves the rcu_cpu_kthread_status per-CPU variable to the rcu_data structure. This also makes this variable unconditionally present, which should be acceptable given the memory reduction due to the RCU flavor consolidation and also due to simplifications this will enable. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com>
-
Paul E. McKenney authored
Given that RCU has a perfectly good per-CPU rcu_data structure, most per-CPU quantities should be stored there. This commit therefore moves the rcu_cpu_kthread_task per-CPU variable to the rcu_data structure. This also makes this variable unconditionally present, which should be acceptable given the memory reduction due to the RCU flavor consolidation and also due to simplifications this will enable. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com>
-
Paul E. McKenney authored
It is perfectly fine to set the rcutree.jiffies_till_first_fqs boot parameter to zero, in fact, this can be useful on specialty systems that usually have at least one idle CPU and that need fast grace periods. This is because this setting causes the RCU grace-period kthread to scan for idle threads immediately after grace-period initialization, as opposed to waiting several jiffies to do so. It is also perfectly fine to set the rcutree.rcu_kick_kthreads kernel parameter, which gives the RCU grace-period kthread an extra wakeup if it doesn't make progress for a period of three times the setting of the rcutree.jiffies_till_first_fqs boot parameter. This is of course problematic when the value of this parameter is zero, as it can result in unnecessary wakeup IPIs along with unnecessary WARN_ONCE() invocations. This commit therefore defers kthread kicking for at least two jiffies, regardless of the setting of rcutree.jiffies_till_first_fqs. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com>
-
Paul E. McKenney authored
None of synchronize_rcu_bh, synchronize_rcu_bh_expedited, call_rcu_bh, rcu_barrier_bh, synchronize_sched, synchronize_sched_expedited, call_rcu_sched, rcu_barrier_sched, get_state_synchronize_sched, and cond_synchronize_sched are actually used. This commit therefore removes their trivial wrapper-function definitions. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com>
-
Paul E. McKenney authored
Back when there were multiple flavors of RCU, it was necessary to separately count lazy and non-lazy callbacks for each CPU. These counts were used in CONFIG_RCU_FAST_NO_HZ kernels to determine how long a newly idle CPU should be allowed to sleep before handling its RCU callbacks. But now that there is only one flavor, the callback counts for a given CPU's sole rcu_data structure are the counts for that CPU. This commit therefore removes the rcu_data structure's ->nonlazy_posted and ->nonlazy_posted_snap fields, the rcu_idle_count_callbacks_posted() and rcu_cpu_has_callbacks() functions, repurposes the rcu_data structure's ->all_lazy field to record the laziness state at the beginning of the latest idle sojourn, and modifies CONFIG_RCU_FAST_NO_HZ RCU CPU stall warnings accordingly. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com>
-
Paul E. McKenney authored
Now that _synchronize_rcu_expedited() has only one caller, and given that this is a tail call, this commit inlines _synchronize_rcu_expedited() into synchronize_rcu_expedited(). Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com>
-
Paul E. McKenney authored
Now that rcu_blocking_is_gp() makes the correct immediate-return decision for both PREEMPT and !PREEMPT, a single implementation of synchronize_rcu() will work correctly under both configurations. This commit therefore eliminates a few lines of code by consolidating the two implementations of synchronize_rcu(). Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com>
-
Paul E. McKenney authored
The CONFIG_PREEMPT=n and CONFIG_PREEMPT=y implementations of synchronize_rcu_expedited() are quite similar, and with small modifications to rcu_blocking_is_gp() can be made identical. This commit therefore makes this change in order to save a few lines of code and to reduce the amount of duplicate code. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com>
-
Paul E. McKenney authored
Back when there could be multiple RCU flavors running in the same kernel at the same time, it was necessary to specify the expedited grace-period IPI handler at runtime. Now that there is only one RCU flavor, the IPI handler can be determined at build time. There is therefore no longer any reason for the RCU-preempt and RCU-sched IPI handlers to have different names, nor is there any reason to pass these handlers in function arguments and in the data structures enclosing workqueues. This commit therefore makes all these changes, pushing the specification of the expedited grace-period IPI handler down to the point of use. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com>
-
Paul E. McKenney authored
The rcu_kthread_do_work() function has a single-line body and only one remaining caller. This commit therefore saves a few lines of code by inlining rcu_kthread_do_work() into its sole remaining caller. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com>
-
Paul E. McKenney authored
Now that the RCU flavors have been consolidated, RCU_BH_FLAVOR and RCU_SCHED_FLAVOR are no longer used. This commit therefore saves a few lines by removing them. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com>
-
Paul E. McKenney authored
Given that rcu_force_quiescent_state() is a simple wrapper around force_quiescent_state(), this commit saves a few lines of code by inlining force_quiescent_state() into rcu_force_quiescent_state(), and changing all references to force_quiescent_state() to instead invoke rcu_force_quiescent_state(). Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com>
-
Paul E. McKenney authored
During expedited RCU grace-period initialization, IPIs are sent to all non-idle online CPUs. The IPI handler checks to see if the CPU is in quiescent state, reporting one if so. This handler looks at three different cases: (1) The CPU is not in an rcu_read_lock()-based critical section, (2) The CPU is in the process of exiting an rcu_read_lock()-based critical section, and (3) The CPU is in an rcu_read_lock()-based critical section. In case (2), execution falls through into case (3). This is harmless from a functionality viewpoint, but can result in needless overhead during an improbable corner case. This commit therefore adds the "return" statement needed to prevent fall-through. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com>
-
Paul E. McKenney authored
Given RCU flavor consolidation, the name rcu_spawn_all_nocb_kthreads() is quite misleading. It no longer ever creates more than one kthread, and it does so only for the specified CPU. This commit therefore changes this name to the more descriptive rcu_spawn_cpu_nocb_kthread(), and also fixes up a similar issue in its header comment while in the area. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com>
-
Paul E. McKenney authored
Now that synchronize_rcu() waits for preempt-disable regions of code as well as RCU read-side critical sections, synchronize_sched() can be replaced by synchronize_rcu(), in fact, synchronize_sched() is now completely equivalent to synchronize_rcu(). This commit therefore replaces synchronize_sched() with synchronize_rcu() so that synchronize_sched() can eventually be removed entirely. Signed-off-by:
Paul E. McKenney <paulmck@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org>
-