10 Feb, 2019

1 commit


26 Jan, 2019

4 commits

  • Although the name rcu_process_callbacks() still makes sense for Tiny
    RCU, where most of what it does is invoke callbacks, it no longer makes
    much sense for Tree RCU, especially given that the actually callback
    invocation is relegated to rcu_do_batch(), or, for no-CBs CPUs, to the
    rcuo kthreads. Especially in the latter case, rcu_process_callbacks()
    has very little to do with actual callbacks. A better description of
    this function is that it performs RCU's core processing.

    This commit therefore changes the name of Tree RCU's rcu_process_callbacks()
    function to rcu_core(), which also has the virtue of being consistent with
    the existing invoke_rcu_core() function.

    While in the area, the header comment is reworked.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • The name rcu_check_callbacks() arguably made sense back in the early
    2000s when RCU was quite a bit simpler than it is today, but it has
    become quite misleading, especially with the advent of dyntick-idle
    and NO_HZ_FULL. The rcu_check_callbacks() function is RCU's hook into
    the scheduling-clock interrupt, and is now but one of many ways that
    callbacks get promoted to invocable state.

    This commit therefore changes the name to rcu_sched_clock_irq(),
    which is the same number of characters and clearly indicates this
    function's relation to the rest of the Linux kernel. In addition, for
    the sake of consistency, rcu_flavor_check_callbacks() is also renamed
    to rcu_flavor_sched_clock_irq().

    While in the area, the header comments for both functions are reworked.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • SRCU's synchronize_srcu() may not be invoked from CPU-hotplug notifiers,
    due to the fact that SRCU grace periods make use of timers and the
    possibility of timers being temporarily stranded on the outgoing CPU.
    This stranding of timers means that timers posted to the outgoing CPU
    will not fire until late in the CPU-hotplug process. The problem is
    that if a notifier is waiting on an SRCU grace period, that grace period
    is waiting on a timer, and that timer is stranded on the outgoing CPU,
    then the notifier will never be awakened, in other words, deadlock has
    occurred. This same situation of course also prohibits srcu_barrier()
    from being invoked from CPU-hotplug notifiers.

    This commit therefore updates the requirements to include this restriction.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • 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

    Paul E. McKenney
     

13 Nov, 2018

9 commits


09 Nov, 2018

2 commits


31 Aug, 2018

4 commits

  • … 'torture.2018.08.29a' into HEAD

    doc.2018.08.30a: Documentation updates
    dynticks.2018.08.30b: RCU flavor consolidation updates and cleanups
    srcu.2018.08.30b: SRCU updates
    torture.2018.08.29a: Torture-test updates

    Paul E. McKenney
     
  • This commit defers reporting of RCU-preempt quiescent states at
    rcu_read_unlock_special() time when any of interrupts, softirq, or
    preemption are disabled. These deferred quiescent states are reported
    at a later RCU_SOFTIRQ, context switch, idle entry, or CPU-hotplug
    offline operation. Of course, if another RCU read-side critical
    section has started in the meantime, the reporting of the quiescent
    state will be further deferred.

    This also means that disabling preemption, interrupts, and/or
    softirqs will act as an RCU-preempt read-side critical section.
    This is enforced by checking preempt_count() as needed.

    Some special cases must be handled on an ad-hoc basis, for example,
    context switch is a quiescent state even though both the scheduler and
    do_exit() disable preemption. In these cases, additional calls to
    rcu_preempt_deferred_qs() override the preemption disabling. Similar
    logic overrides disabled interrupts in rcu_preempt_check_callbacks()
    because in this case the quiescent state happened just before the
    corresponding scheduling-clock interrupt.

    In theory, this change lifts a long-standing restriction that required
    that if interrupts were disabled across a call to rcu_read_unlock()
    that the matching rcu_read_lock() also be contained within that
    interrupts-disabled region of code. Because the reporting of the
    corresponding RCU-preempt quiescent state is now deferred until
    after interrupts have been enabled, it is no longer possible for this
    situation to result in deadlocks involving the scheduler's runqueue and
    priority-inheritance locks. This may allow some code simplification that
    might reduce interrupt latency a bit. Unfortunately, in practice this
    would also defer deboosting a low-priority task that had been subjected
    to RCU priority boosting, so real-time-response considerations might
    well force this restriction to remain in place.

    Because RCU-preempt grace periods are now blocked not only by RCU
    read-side critical sections, but also by disabling of interrupts,
    preemption, and softirqs, it will be possible to eliminate RCU-bh and
    RCU-sched in favor of RCU-preempt in CONFIG_PREEMPT=y kernels. This may
    require some additional plumbing to provide the network denial-of-service
    guarantees that have been traditionally provided by RCU-bh. Once these
    are in place, CONFIG_PREEMPT=n kernels will be able to fold RCU-bh
    into RCU-sched. This would mean that all kernels would have but
    one flavor of RCU, which would open the door to significant code
    cleanup.

    Moving to a single flavor of RCU would also have the beneficial effect
    of reducing the NOCB kthreads by at least a factor of two.

    Signed-off-by: Paul E. McKenney
    [ paulmck: Apply rcu_read_unlock_special() preempt_count() feedback
    from Joel Fernandes. ]
    [ paulmck: Adjust rcu_eqs_enter() call to rcu_preempt_deferred_qs() in
    response to bug reports from kbuild test robot. ]
    [ paulmck: Fix bug located by kbuild test robot involving recursion
    via rcu_preempt_deferred_qs(). ]

    Paul E. McKenney
     
  • This commit adds the needed "

    Paul E. McKenney
     
  • The RCU-bh update API is now defined in terms of that of RCU-bh and
    RCU-sched, so this commit updates the documentation accordingly.

    In addition, although RCU-sched persists in !PREEMPT kernels, in
    the PREEMPT case its update API is now defined in terms of that of
    RCU-preempt, so this commit also updates the documentation accordingly.

    While in the area, this commit removes the documentation for the
    now-obsolete synchronize_rcu_mult() and clarifies the Tasks RCU
    documentation.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     

29 Aug, 2018

3 commits


13 Jul, 2018

2 commits


12 Dec, 2017

1 commit


06 Dec, 2017

1 commit


05 Dec, 2017

1 commit


29 Nov, 2017

1 commit


14 Nov, 2017

1 commit

  • Pull RCU updates from Ingo Molnar:
    "The main changes in this cycle are:

    - Documentation updates

    - RCU CPU stall-warning updates

    - Torture-test updates

    - Miscellaneous fixes

    Size wise the biggest updates are to documentation. Excluding
    documentation most of the code increase comes from a single commit
    which expands debugging"

    * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits)
    srcu: Add parameters to SRCU docbook comments
    doc: Rewrite confusing statement about memory barriers
    memory-barriers.txt: Fix typo in pairing example
    rcu/segcblist: Include rcupdate.h
    rcu: Add extended-quiescent-state testing advice
    rcu: Suppress lockdep false-positive ->boost_mtx complaints
    rcu: Do not include rtmutex_common.h unconditionally
    torture: Provide TMPDIR environment variable to specify tmpdir
    rcutorture: Dump writer stack if stalled
    rcutorture: Add interrupt-disable capability to stall-warning tests
    rcu: Suppress RCU CPU stall warnings while dumping trace
    rcu: Turn off tracing before dumping trace
    rcu: Make RCU CPU stall warnings check for irq-disabled CPUs
    sched,rcu: Make cond_resched() provide RCU quiescent state
    sched: Make resched_cpu() unconditional
    irq_work: Map irq_work_on_queue() to irq_work_on() in !SMP
    rcu: Create call_rcu_tasks() kthread at boot time
    rcu: Fix up pending cbs check in rcu_prepare_for_idle
    memory-barriers: Rework multicopy-atomicity section
    memory-barriers: Replace uses of "transitive"
    ...

    Linus Torvalds
     

20 Oct, 2017

1 commit


10 Oct, 2017

1 commit


17 Aug, 2017

1 commit


09 Jun, 2017

3 commits

  • RCU's debugfs tracing used to be the only reasonable low-level debug
    information available, but ftrace and event tracing has since surpassed
    the RCU debugfs level of usefulness. This commit therefore removes
    RCU's debugfs tracing.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • The sparse-based checking for non-RCU accesses to RCU-protected pointers
    has been around for a very long time, and it is now the only type of
    sparse-based checking that is optional. This commit therefore makes
    it unconditional.

    Reported-by: Ingo Molnar
    Signed-off-by: Paul E. McKenney
    Cc: Fengguang Wu

    Paul E. McKenney
     
  • The NO_HZ_FULL_SYSIDLE full-system-idle capability was added in 2013
    by commit 0edd1b1784cb ("nohz_full: Add full-system-idle state machine"),
    but has not been used. This commit therefore removes it.

    If it turns out to be needed later, this commit can always be reverted.

    Signed-off-by: Paul E. McKenney
    Cc: Frederic Weisbecker
    Cc: Rik van Riel
    Cc: Ingo Molnar
    Acked-by: Linus Torvalds

    Paul E. McKenney
     

08 Jun, 2017

2 commits


21 Apr, 2017

1 commit


19 Apr, 2017

1 commit

  • The rcu_all_qs() and rcu_note_context_switch() do a series of checks,
    taking various actions to supply RCU with quiescent states, depending
    on the outcomes of the various checks. This is a bit much for scheduling
    fastpaths, so this commit creates a separate ->rcu_urgent_qs field in
    the rcu_dynticks structure that acts as a global guard for these checks.
    Thus, in the common case, rcu_all_qs() and rcu_note_context_switch()
    check the ->rcu_urgent_qs field, find it false, and simply return.

    Signed-off-by: Paul E. McKenney
    Cc: Peter Zijlstra

    Paul E. McKenney