• Linus Torvalds's avatar
    Merge tag 'locking-core-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ed016af5
    Linus Torvalds authored
    Pull locking updates from Ingo Molnar:
     "These are the locking updates for v5.10:
    
       - Add deadlock detection for recursive read-locks.
    
         The rationale is outlined in commit 224ec489 ("lockdep/
         Documention: Recursive read lock detection reasoning")
    
         The main deadlock pattern we want to detect is:
    
               TASK A:                 TASK B:
    
               read_lock(X);
                                       write_lock(X);
               read_lock_2(X);
    
       - Add "latch sequence counters" (seqcount_latch_t):
    
         A sequence counter variant where the counter even/odd value is used
         to switch between two copies of protected data. This allows the
         read path, typically NMIs, to safely interrupt the write side
         critical section.
    
         We utilize this new variant for sched-clock, and to make x86 TSC
         handling safer.
    
       - Other seqlock cleanups, fixes and enhancements
    
       - KCSAN updates
    
       - LKMM updates
    
       - Misc updates, cleanups and fixes"
    
    * tag 'locking-core-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (67 commits)
      lockdep: Revert "lockdep: Use raw_cpu_*() for per-cpu variables"
      lockdep: Fix lockdep recursion
      lockdep: Fix usage_traceoverflow
      locking/atomics: Check atomic-arch-fallback.h too
      locking/seqlock: Tweak DEFINE_SEQLOCK() kernel doc
      lockdep: Optimize the memory usage of circular queue
      seqlock: Unbreak lockdep
      seqlock: PREEMPT_RT: Do not starve seqlock_t writers
      seqlock: seqcount_LOCKNAME_t: Introduce PREEMPT_RT support
      seqlock: seqcount_t: Implement all read APIs as statement expressions
      seqlock: Use unique prefix for seqcount_t property accessors
      seqlock: seqcount_LOCKNAME_t: Standardize naming convention
      seqlock: seqcount latch APIs: Only allow seqcount_latch_t
      rbtree_latch: Use seqcount_latch_t
      x86/tsc: Use seqcount_latch_t
      timekeeping: Use seqcount_latch_t
      time/sched_clock: Use seqcount_latch_t
      seqlock: Introduce seqcount_latch_t
      mm/swap: Do not abuse the seqcount_t latching API
      time/sched_clock: Use raw_read_seqcount_latch() during suspend
      ...
    ed016af5
check.c 69.5 KB