26 Sep, 2013

1 commit


25 Sep, 2013

1 commit


01 Sep, 2013

1 commit


21 Aug, 2013

1 commit

  • Currently, rcutorture has separate torture_types to test synchronous,
    asynchronous, and expedited grace-period primitives. This has
    two disadvantages: (1) Three times the number of runs to cover the
    combinations and (2) Little testing of concurrent combinations of the
    three options. This commit therefore adds a pair of module parameters
    that control normal and expedited state, with the default being both
    types, randomly selected, by the fakewriter processes, thus reducing
    source-code size and increasing test coverage. In addtion, the writer
    task switches between asynchronous-normal and expedited grace-period
    primitives driven by the same pair of module parameters.

    Signed-off-by: Paul E. McKenney
    Reviewed-by: Josh Triplett

    Paul E. McKenney
     

20 Aug, 2013

1 commit

  • Note that this commit also updates the formatting of serveral of the
    bibtex entries to conform to that of my .bib files. I started
    accumulating entries back in the 1980s, back when bibtex insisted
    that comma (",") was a separator, not a terminator. This rule forced
    commas to the fronts of lines. 25 years later, bibtex allows commas
    to be terminators, but I am too lazy to rework all my .bib files.
    Keeping the same format as my .bib files allows my to simply
    incorporate my RCU.bib file into Documentation/RCU/RTFP.txt, which
    is much easier than my earlier practice of keeping track of what
    had changed and adding individual entries. (I sometimes find relevant
    papers that were published some years back, for example.)

    In addition, this change adds entries for papers published in the
    last year or so.

    Signed-off-by: Paul E. McKenney
    Reviewed-by: Josh Triplett

    Paul E. McKenney
     

19 Aug, 2013

1 commit

  • There was a time when rcu_barrier() was guaranteed to wait for at least
    a grace period, but that time ended due to energy-efficiency concerns.
    So now rcu_barrier() is a no-op if there are no RCU callbacks queued in
    the system. This commit updates the documentation to reflect this change.

    Now, rcu_barrier() often does wait for a grace period, so, one could
    imagine some modification to rcu_barrier() to more efficiently handle
    cases where both rcu_barrier() and a grace period are needed. But this
    must wait until someone shows a real-world need for a change.

    Reported-by: Bob Copeland
    Reported-by: Johannes Berg
    Signed-off-by: Paul E. McKenney
    Reviewed-by: Josh Triplett

    Paul E. McKenney
     

11 Jun, 2013

3 commits


02 May, 2013

1 commit


03 Apr, 2013

1 commit

  • We are planning to convert the dynticks Kconfig options layout
    into a choice menu. The user must be able to easily pick
    any of the following implementations: constant periodic tick,
    idle dynticks, full dynticks.

    As this implies a mutual exclusion, the two dynticks implementions
    need to converge on the selection of a common Kconfig option in order
    to ease the sharing of a common infrastructure.

    It would thus seem pretty natural to reuse CONFIG_NO_HZ to
    that end. It already implements all the idle dynticks code
    and the full dynticks depends on all that code for now.
    So ideally the choice menu would propose CONFIG_NO_HZ_IDLE and
    CONFIG_NO_HZ_EXTENDED then both would select CONFIG_NO_HZ.

    On the other hand we want to stay backward compatible: if
    CONFIG_NO_HZ is set in an older config file, we want to
    enable CONFIG_NO_HZ_IDLE by default.

    But we can't afford both at the same time or we run into
    a circular dependency:

    1) CONFIG_NO_HZ_IDLE and CONFIG_NO_HZ_EXTENDED both select
    CONFIG_NO_HZ
    2) If CONFIG_NO_HZ is set, we default to CONFIG_NO_HZ_IDLE

    We might be able to support that from Kconfig/Kbuild but it
    may not be wise to introduce such a confusing behaviour.

    So to solve this, create a new CONFIG_NO_HZ_COMMON option
    which gathers the common code between idle and full dynticks
    (that common code for now is simply the idle dynticks code)
    and select it from their referring Kconfig.

    Then we'll later create CONFIG_NO_HZ_IDLE and map CONFIG_NO_HZ
    to it for backward compatibility.

    Signed-off-by: Frederic Weisbecker
    Cc: Andrew Morton
    Cc: Chris Metcalf
    Cc: Christoph Lameter
    Cc: Geoff Levand
    Cc: Gilad Ben Yossef
    Cc: Hakan Akkan
    Cc: Ingo Molnar
    Cc: Kevin Hilman
    Cc: Li Zhong
    Cc: Namhyung Kim
    Cc: Paul E. McKenney
    Cc: Paul Gortmaker
    Cc: Peter Zijlstra
    Cc: Steven Rostedt
    Cc: Thomas Gleixner

    Frederic Weisbecker
     

26 Mar, 2013

1 commit


14 Mar, 2013

1 commit

  • If RCU's softirq handler is prevented from executing, an RCU CPU stall
    warning can result. Ways to prevent RCU's softirq handler from executing
    include: (1) CPU spinning with interrupts disabled, (2) infinite loop
    in some softirq handler, and (3) in -rt kernels, an infinite loop in a
    set of real-time threads running at priorities higher than that of RCU's
    softirq handler.

    Because this situation can be difficult to track down, this commit causes
    the count of RCU softirq handler invocations to be printed with RCU
    CPU stall warnings. This information does require some interpretation,
    as now documented in Documentation/RCU/stallwarn.txt.

    Reported-by: Thomas Gleixner
    Signed-off-by: Paul E. McKenney
    Tested-by: Paul Gortmaker

    Paul E. McKenney
     

13 Mar, 2013

2 commits


17 Nov, 2012

3 commits

  • …cu.2012.10.27a', 'stall.2012.11.13a', 'tracing.2012.11.08a' and 'idle.2012.10.24a' into HEAD

    urgent.2012.10.27a: Fix for RCU user-mode transition (already in -tip).

    doc.2012.11.08a: Documentation updates, most notably codifying the
    memory-barrier guarantees inherent to grace periods.

    fixes.2012.11.13a: Miscellaneous fixes.

    srcu.2012.10.27a: Allow statically allocated and initialized srcu_struct
    structures (courtesy of Lai Jiangshan).

    stall.2012.11.13a: Add more diagnostic information to RCU CPU stall
    warnings, also decrease from 60 seconds to 21 seconds.

    hotplug.2012.11.08a: Minor updates to CPU hotplug handling.

    tracing.2012.11.08a: Improved debugfs tracing, courtesy of Michael Wang.

    idle.2012.10.24a: Updates to RCU idle/adaptive-idle handling, including
    a boot parameter that maps normal grace periods to expedited.

    Resolved conflict in kernel/rcutree.c due to side-by-side change.

    Paul E. McKenney
     
  • This commit adds the documentation of the rcuexp debugfs trace file
    that records statistics for expedited grace periods.

    Signed-off-by: Paul E. McKenney
    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • This commit updates the tracing documentation to reflect the new
    format that has per-RCU-flavor directories.

    Signed-off-by: Paul E. McKenney
    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     

14 Nov, 2012

1 commit


09 Nov, 2012

2 commits

  • The approach for mixing RCU and reference counting listed in the RCU
    documentation only describes one possible approach. This approach can
    result in failure on the read side, which is nice if you want fresh data,
    but not so good if you want simple code. This commit therefore adds
    two additional approaches that feature unconditional reference-count
    acquisition by RCU readers. These approaches are very similar to that
    used in the security code.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • Mention kfree_rcu() in the call_rcu() section. Additionally fix the
    example code for list replacement that used the wrong structure element.

    Signed-off-by: Kees Cook
    Signed-off-by: Paul E. McKenney

    Kees Cook
     

24 Oct, 2012

1 commit


25 Sep, 2012

1 commit

  • …', 'hotplug.2012.09.23a' and 'idlechop.2012.09.23a' into HEAD

    bigrt.2012.09.23a contains additional commits to reduce scheduling latency
    from RCU on huge systems (many hundrends or thousands of CPUs).

    doctorture.2012.09.23a contains documentation changes and rcutorture fixes.

    fixes.2012.09.23a contains miscellaneous fixes.

    hotplug.2012.09.23a contains CPU-hotplug-related changes.

    idle.2012.09.23a fixes architectures for which RCU no longer considered
    the idle loop to be a quiescent state due to earlier
    adaptive-dynticks changes. Affected architectures are alpha,
    cris, frv, h8300, m32r, m68k, mn10300, parisc, score, xtensa,
    and ia64.

    Paul E. McKenney
     

23 Sep, 2012

3 commits

  • The print_cpu_stall_fast_no_hz() function attempts to print -1 when
    the ->idle_gp_timer is not pending, but unsigned arithmetic causes it
    to instead print ULONG_MAX, which is 4294967295 on 32-bit systems and
    18446744073709551615 on 64-bit systems. Neither of these are the most
    reader-friendly values, so this commit instead causes "timer not pending"
    to be printed when ->idle_gp_timer is not pending.

    Reported-by: Paul Walmsley
    Signed-off-by: Paul E. McKenney
    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • The current documentation did not help someone grepping for SRCU to
    learn that disabling preemption is not a replacement for srcu_read_lock(),
    so upgrade the documentation to bring this out, not just for SRCU,
    but also for RCU-bh. Also document the fact that SRCU readers are
    respected on CPUs executing in user mode, idle CPUs, and even on
    offline CPUs.

    Signed-off-by: Paul E. McKenney
    Reviewed-by: Josh Triplett
    Reviewed-by: Lai Jiangshan

    Paul E. McKenney
     
  • Moving quiescent-state forcing into a kthread dispenses with the need
    for the ->n_rp_need_fqs field, so this commit removes it.

    Signed-off-by: Paul E. McKenney
    Reviewed-by: Josh Triplett

    Paul E. McKenney
     

03 Jul, 2012

1 commit


01 May, 2012

1 commit

  • Although rcutorture does invoke rcu_barrier() and friends, it cannot
    really be called a torture test given that it invokes them only once
    at the end of the test. This commit therefore introduces heavy-duty
    rcutorture testing for rcu_barrier(), which may be carried out
    concurrently with normal rcutorture testing.

    Signed-off-by: Paul E. McKenney
    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     

22 Feb, 2012

7 commits

  • The expedited RCU primitives can be quite useful, but they have some
    high costs as well. This commit updates and creates docbook comments
    calling out the costs, and updates the RCU documentation as well.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • Because newly offlined CPUs continue executing after completing the
    CPU_DYING notifiers, they legitimately enter the scheduler and use
    RCU while appearing to be offline. This calls for a more sophisticated
    approach as follows:

    1. RCU marks the CPU online during the CPU_UP_PREPARE phase.

    2. RCU marks the CPU offline during the CPU_DEAD phase.

    3. Diagnostics regarding use of read-side RCU by offline CPUs use
    RCU's accounting rather than the cpu_online_map. (Note that
    __call_rcu() still uses cpu_online_map to detect illegal
    invocations within CPU_DYING notifiers.)

    4. Offline CPUs are prevented from hanging the system by
    force_quiescent_state(), which pays attention to cpu_online_map.
    Some additional work (in a later commit) will be needed to
    guarantee that force_quiescent_state() waits a full jiffy before
    assuming that a CPU is offline, for example, when called from
    idle entry. (This commit also makes the one-jiffy wait
    explicit, since the old-style implicit wait can now be defeated
    by RCU_FAST_NO_HZ and by rcutorture.)

    This approach avoids the false positives encountered when attempting to
    use more exact classification of CPU online/offline state.

    Signed-off-by: Paul E. McKenney
    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • Add documentation of CONFIG_RCU_CPU_STALL_VERBOSE, CONFIG_RCU_CPU_STALL_INFO,
    and RCU_STALL_DELAY_DELTA. Describe multiple stall-warning messages from
    a single stall, and the timing of the subsequent messages. Add headings.
    Remove RCU_SECONDS_TILL_STALL_RECHECK because this value is now computed
    at runtime from RCU_CPU_STALL_TIMEOUT, so that sysfs changes to the timeout
    value now directly affect the RCU_SECONDS_TILL_STALL_RECHECK value.

    Signed-off-by: Paul E. McKenney
    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • Add module parameters to rcutorture that induce a CPU stall.
    The stall_cpu parameter specifies how long to stall in seconds,
    defaulting to zero, which indicates no stalling is to be undertaken.
    The stall_cpu_holdoff parameter specifies how many seconds after
    insmod (or boot, if rcutorture is built into the kernel) that this
    stall is to start. The default value for stall_cpu_holdoff is ten
    seconds.

    Signed-off-by: Paul E. McKenney
    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • The torture.txt documentation gives an example rcutorture run with a
    100-second duration. This is ridiculously short, unless maybe testing
    a fix for a egregious bug. Use a more-realistic one-hour duration for
    the example.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • When rcutorture is started automatically at boot time, it might well
    also start CPU-hotplug operations at that time, which might not be
    desirable. This commit therefore adds an rcutorture parameter that
    allows CPU-hotplug operations to be held off for the specified number
    of seconds after the start of boot.

    Signed-off-by: Paul E. McKenney
    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • Add publications from 2010 and 2011 to RTFP.txt.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     

12 Dec, 2011

5 commits

  • Tyler Hicks pointed me at an additional article on RCU and I figured
    it should probably be mentioned with the others.

    Signed-off-by: Kees Cook
    Signed-off-by: Paul E. McKenney

    Kees Cook
     
  • Running CPU-hotplug operations concurrently with rcutorture has
    historically been a good way to find bugs in both RCU and CPU hotplug.
    This commit therefore adds an rcutorture module parameter called
    "onoff_interval" that causes a randomly selected CPU-hotplug operation to
    be executed at the specified interval, in seconds. The default value of
    "onoff_interval" is zero, which disables rcutorture-instigated CPU-hotplug
    operations.

    Signed-off-by: Paul E. McKenney
    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • Although it is easy to run rcutorture tests under KVM, there is currently
    no nice way to run such a test for a fixed time period, collect all of
    the rcutorture data, and then shut the system down cleanly. This commit
    therefore adds an rcutorture module parameter named "shutdown_secs" that
    specified the run duration in seconds, after which rcutorture terminates
    the test and powers the system down. The default value for "shutdown_secs"
    is zero, which disables shutdown.

    Signed-off-by: Paul E. McKenney
    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • Update various files in Documentation/RCU to reflect srcu_read_lock_raw()
    and srcu_read_unlock_raw(). Credit to Peter Zijlstra for suggesting
    use of the existing _raw suffix instead of the earlier bulkref names.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • One of lclaudio's systems was seeing RCU CPU stall warnings from idle.
    These turned out to be caused by a bug that stopped scheduling-clock
    tick interrupts from being sent to a given CPU for several hundred seconds.
    This commit therefore updates the documentation to call this out as a
    possible cause for RCU CPU stall warnings.

    Signed-off-by: Paul E. McKenney
    Reviewed-by: Josh Triplett

    Paul E. McKenney