1. 17 Jul, 2018 1 commit
    • Ingo Molnar's avatar
      Merge branch 'for-mingo' of... · ea73a5c6
      Ingo Molnar authored
      Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu
      
      Pull RCU updates from Paul E. McKenney:
      
      - An optimization and a fix for RCU expedited grace periods, with
        the fix being from Boqun Feng.
      
      - Miscellaneous fixes, including a lockdep-annotation fix from
        Boqun Feng.
      
      - SRCU updates.
      
      - Updates to rcutorture and associated scripting.
      
      - Introduce grace-period sequence numbers to the RCU-bh, RCU-preempt,
        and RCU-sched flavors, replacing the old ->gpnum and ->completed
        pair of fields.  This change allows lockless code to obtain the
        complete grace-period state with a single READ_ONCE(), which is
        needed to maintain tolerable lock contention during the upcoming
        consolidation of the three RCU flavors.  Note that grace-period
        sequence numbers are already used by rcu_barrier(), expedited
        RCU grace periods, and SRCU, and are thus already heavily used
        and well-tested.  Joel Fernandes contributed a number of excellent
        fixes and improvements.
      
      - Clean up some grace-period-reporting loose ends, including
        improving the handling of quiescent states from offline CPUs
        and fixing some false-positive WARN_ON_ONCE() invocations.
        (Strictly speaking, the WARN_ON_ONCE() invocations were quite
        correct, but their invariants were (harmlessly) violated by the
        earlier sloppy handling of quiescent states from offline CPUs.)
        In addition, improve grace-period forward-progress guarantees so
        as to allow removal of fail-safe checks that required otherwise
        needless lock acquisitions.  Finally, add more diagnostics to
        help debug the upcoming consolidation of the RCU-bh, RCU-preempt,
        and RCU-sched flavors.
      
      - Additional miscellaneous fixes, including those contributed by
        Byungchul Park, Mauro Carvalho Chehab, Joe Perches, Joel Fernandes,
        Steven Rostedt, Andrea Parri, and Neil Brown.
      
      - Additional torture-test changes, including several contributed by
        Arnd Bergmann and Joel Fernandes.
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      ea73a5c6
  2. 15 Jul, 2018 2 commits
  3. 14 Jul, 2018 19 commits
  4. 13 Jul, 2018 15 commits
  5. 12 Jul, 2018 3 commits
    • Joel Fernandes (Google)'s avatar
      tracing: Reorder display of TGID to be after PID · f8494fa3
      Joel Fernandes (Google) authored
      Currently ftrace displays data in trace output like so:
      
                                             _-----=> irqs-off
                                            / _----=> need-resched
                                           | / _---=> hardirq/softirq
                                           || / _--=> preempt-depth
                                           ||| /     delay
                  TASK-PID   CPU    TGID   ||||    TIMESTAMP  FUNCTION
                     | |       |      |    ||||       |         |
                  bash-1091  [000] ( 1091) d..2    28.313544: sched_switch:
      
      However Android's trace visualization tools expect a slightly different
      format due to an out-of-tree patch patch that was been carried for a
      decade, notice that the TGID and CPU fields are reversed:
      
                                             _-----=> irqs-off
                                            / _----=> need-resched
                                           | / _---=> hardirq/softirq
                                           || / _--=> preempt-depth
                                           ||| /     delay
                  TASK-PID    TGID   CPU   ||||    TIMESTAMP  FUNCTION
                     | |        |      |   ||||       |         |
                  bash-1091  ( 1091) [002] d..2    64.965177: sched_switch:
      
      From kernel v4.13 onwards, during which TGID was introduced, tracing
      with systrace on all Android kernels will break (most Android kernels
      have been on 4.9 with Android patches, so this issues hasn't been seen
      yet). From v4.13 onwards things will break.
      
      The chrome browser's tracing tools also embed the systrace viewer which
      uses the legacy TGID format and updates to that are known to be
      difficult to make.
      
      Considering this, I suggest we make this change to the upstream kernel
      and backport it to all Android kernels. I believe this feature is merged
      recently enough into the upstream kernel that it shouldn't be a problem.
      Also logically, IMO it makes more sense to group the TGID with the
      TASK-PID and the CPU after these.
      
      Link: http://lkml.kernel.org/r/20180626000822.113931-1-joel@joelfernandes.org
      
      Cc: jreck@google.com
      Cc: tkjos@google.com
      Cc: stable@vger.kernel.org
      Fixes: 441dae8f ("tracing: Add support for display of tgid in trace output")
      Signed-off-by: default avatarJoel Fernandes (Google) <joel@joelfernandes.org>
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      f8494fa3
    • Paul E. McKenney's avatar
      Merge branches 'fixes1.2018.07.12b' and 'torture1.2018.07.12b' into HEAD · 18952651
      Paul E. McKenney authored
      fixes1.2018.07.12b: Post-gp_seq miscellaneous fixes
      torture1.2018.07.12b: Post-gp_seq torture-test updates
      18952651
    • Joel Fernandes (Google)'s avatar
      rcutorture: Fix rcu_barrier successes counter · bf5b6435
      Joel Fernandes (Google) authored
      The rcutorture test module currently increments both successes and error
      for the barrier test upon error, which results in misleading statistics
      being printed.  This commit therefore changes the code to increment the
      success counter only when the test actually passes.
      
      This change was tested by by returning from the barrier callback without
      incrementing the callback counter, thus introducing what appeared to
      rcutorture to be rcu_barrier() failures.
      Signed-off-by: default avatarJoel Fernandes (Google) <joel@joelfernandes.org>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      bf5b6435