linux/kernel/rcu
Linus Torvalds 98e7dcbb82 RCU pull request for v6.19
SRCU
 ----
 
 _ Properly handle SRCU readers within IRQ disabled sections in tiny SRCU
 
 - Preparation to reimplement RCU Tasks Trace on top of SRCU fast:
 
     - Introduce API to expedite a grace period and test it through
       rcutorture.
 
     - Split srcu-fast in two flavours: SRCU-fast and SRCU-fast-updown.
       Both are still targeted toward faster readers (without full
       barriers on LOCK and UNLOCK) at the expense of heavier write side
       (using full RCU grace period ordering instead of simply full
       ordering) as compared to "traditional" non-fast SRCU. But those
       srcu-fast flavours are going to be optimized in two different
       ways:
 
          - SRCU-fast will become the reimplementation basis for
            RCU-TASK-TRACE for consolidation. Since RCU-TASK-TRACE must
            be NMI safe, SRCU-fast must be as well.
 
          - SRCU-fast-updown will be needed for uretprobes code in order
            to get rid of the read-side memory barriers while still
            allowing entering the reader at task level while exiting it
            in a timer handler. It is considered semaphore-like in that
            it can have different owners between LOCK and UNLOCK.
            However it is not NMI-safe.
 
       The actual optimizations are work in progress for the next cycle.
       Only the new interfaces are added for now, along with related
       torture and scalability test code.
 
 - Create/document/debug/torture new proper initializers for RCU fast:
   DEFINE_SRCU_FAST() and init_srcu_struct_fast()
 
   This allows for using right away the proper ordering on the write
   side (either full ordering or full RCU grace period ordering) without
   waiting for the read side to tell which to use. Also this optimizes
   the read side altogether with moving flavour debug checks under debug
   config and with removing a costly RmW operation on their first call.
 
 - Make some diagnostic functions tracing safe.
 
 REFSCALE
 -------
 
 Add performance testing for common context synchronizations
 (Preemption, IRQ, Softirq) and per-cpu increments. Those are
 relevant comparisons against SRCU-fast read side APIs, especially
 as they are planned to synchronize further tracing fast-path code.
 
 MISCELLANOUS
 ------
 
 - In order to prepare the layout for nohz_full work deferral to
   user exit, the context tracking state must shrink the counter
   of transitions to/from RCU not watching. The only possible hazard
   is to trigger wrap-around more easily, delaying a bit grace periods
   when that happens. This should be a rare event though. Yet add
   debugging and torture code to test that assumption.
 
 - Fix memory leak on locktorture module
 
 - Annotate accesses in rculist_nulls.h to prevent from KCSAN warnings.
   On recent discussions, we also concluded that all those WRITE_ONCE()
   and READ_ONCE() on list APIs deserve appropriate comments. Something
   to be expected for the next cycle.
 
 - Provide a script to apply several configs to several commits with torture.
 
 - Allow torture to reuse a build directory in order to save needless
   rebuild time.
 
 - Various cleanups.
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEd76+gtGM8MbftQlOhSRUR1COjHcFAmksubgbFIAAAAAABAAO
 bWFudTIsMi41KzEuMTEsMiwyAAoJEIUkVEdQjox3MJ0P/Aq+AOPWuaE70B8SxVYY
 VfucjjzZwSyI30Vw4GE8skNVMOnyY2wPIrNRgmckghi9LM5luureMcks9esrdFfv
 csWj3AhnBu+/Lyd4EhP8AxMH2OPIX50FUrAQaY7LAcmc4nIng1MqRm35eT776XzR
 tN07+nsXjNumPcdN8JAv/VzInUf5DdMvhy+Qw0Krpvan/sUpzzpFpNUWdHsyZ2Re
 UCQr//AooQLfCIIIHUYlviThqigJETZlv0NKYrD0Zaxx5MCOwwWmz5otQzacSRk2
 Zgn6Bayp98s0972sOghiMRXEoSvqBSJe5eVTWcj1oNLruO3flpyREgE5Wuo8T8Bg
 BHvOiYaPNC5FW+btCWOQcKcSx1mxrgsX3/9OAth+kmtPqZdJSQEeY+zqWzdN7ZlV
 q5+oipsFONvWXL6+U6uZf44MG1pscrzn6QvXajjg98iaLZgY0+mkAhvtpjcfuTwZ
 2CXYQKacfwftpOXgM2QQGB4QE8CKXchlma381KbTHv0rX8zfK0BnWoe/oGPz22GL
 3kldmhfIC/87i8t9HHngkU6SZ+Mkvf9vC28eclnuXB1PKCRsBHePGvi3I671kbLj
 hycBwnwWriULEwKYTVQ8gmdBHSANB4IpmMYflADVqLuvp+7U6W5mNjWNTcXoSwFl
 NoR7AViEUNzOEoa8u6WMKoec
 =XnUt
 -----END PGP SIGNATURE-----

Merge tag 'rcu.release.v6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux

Pull RCU updates from Frederic Weisbecker:
 "SRCU:

   - Properly handle SRCU readers within IRQ disabled sections in tiny
     SRCU

   - Preparation to reimplement RCU Tasks Trace on top of SRCU fast:

      - Introduce API to expedite a grace period and test it through
        rcutorture

      - Split srcu-fast in two flavours: SRCU-fast and SRCU-fast-updown.

        Both are still targeted toward faster readers (without full
        barriers on LOCK and UNLOCK) at the expense of heavier write
        side (using full RCU grace period ordering instead of simply
        full ordering) as compared to "traditional" non-fast SRCU. But
        those srcu-fast flavours are going to be optimized in two
        different ways:

          - SRCU-fast will become the reimplementation basis for
            RCU-TASK-TRACE for consolidation. Since RCU-TASK-TRACE must
            be NMI safe, SRCU-fast must be as well.

          - SRCU-fast-updown will be needed for uretprobes code in order
            to get rid of the read-side memory barriers while still
            allowing entering the reader at task level while exiting it
            in a timer handler. It is considered semaphore-like in that
            it can have different owners between LOCK and UNLOCK.
            However it is not NMI-safe.

        The actual optimizations are work in progress for the next
        cycle. Only the new interfaces are added for now, along with
        related torture and scalability test code.

   - Create/document/debug/torture new proper initializers for RCU fast:
     DEFINE_SRCU_FAST() and init_srcu_struct_fast()

     This allows for using right away the proper ordering on the write
     side (either full ordering or full RCU grace period ordering)
     without waiting for the read side to tell which to use.

     This also optimizes the read side altogether with moving flavour
     debug checks under debug config and with removing a costly RmW
     operation on their first call.

   - Make some diagnostic functions tracing safe

  Refscale:

   - Add performance testing for common context synchronizations
     (Preemption, IRQ, Softirq) and per-cpu increments. Those are
     relevant comparisons against SRCU-fast read side APIs, especially
     as they are planned to synchronize further tracing fast-path code

  Miscellanous:

   - In order to prepare the layout for nohz_full work deferral to user
     exit, the context tracking state must shrink the counter of
     transitions to/from RCU not watching. The only possible hazard is
     to trigger wrap-around more easily, delaying a bit grace periods
     when that happens. This should be a rare event though. Yet add
     debugging and torture code to test that assumption

   - Fix memory leak on locktorture module

   - Annotate accesses in rculist_nulls.h to prevent from KCSAN
     warnings. On recent discussions, we also concluded that all those
     WRITE_ONCE() and READ_ONCE() on list APIs deserve appropriate
     comments. Something to be expected for the next cycle

   - Provide a script to apply several configs to several commits with
     torture

   - Allow torture to reuse a build directory in order to save needless
     rebuild time

   - Various cleanups"

* tag 'rcu.release.v6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux: (29 commits)
  refscale: Add SRCU-fast-updown readers
  refscale: Exercise DEFINE_STATIC_SRCU_FAST() and init_srcu_struct_fast()
  rcutorture: Make srcu{,d}_torture_init() announce the SRCU type
  srcu: Create an SRCU-fast-updown API
  refscale: Do not disable interrupts for tests involving local_bh_enable()
  refscale: Add non-atomic per-CPU increment readers
  refscale: Add this_cpu_inc() readers
  refscale: Add preempt_disable() readers
  refscale: Add local_bh_disable() readers
  refscale: Add local_irq_disable() and local_irq_save() readers
  torture: Permit negative kvm.sh --kconfig numberic arguments
  srcu: Add SRCU_READ_FLAVOR_FAST_UPDOWN CPP macro
  rcu: Mark diagnostic functions as notrace
  rcutorture: Make TREE04 use CONFIG_RCU_DYNTICKS_TORTURE
  rcutorture: Remove redundant rcutorture_one_extend() from rcu_torture_one_read()
  rcutorture: Permit kvm-again.sh to re-use the build directory
  torture: Add kvm-series.sh to test commit/scenario combination
  rcu: use WRITE_ONCE() for ->next and ->pprev of hlist_nulls
  locktorture: Fix memory leak in param_set_cpumask()
  doc: Update for SRCU-fast definitions and initialization
  ...
2025-12-03 12:18:07 -08:00
..
Kconfig srcu: Make FORCE_NEED_SRCU_NMI_SAFE depend on RCU_EXPERT 2025-03-28 21:19:17 -07:00
Kconfig.debug rcu: Add a small-width RCU watching counter debug option 2025-10-28 17:32:56 +01:00
Makefile rcuperf: Change rcuperf to rcuscale 2020-08-24 18:39:24 -07:00
rcu.h Merge branches 'rcu/misc-for-6.16', 'rcu/seq-counters-for-6.16' and 'rcu/torture-for-6.16' into rcu/for-next 2025-05-16 11:18:16 -04:00
rcu_segcblist.c rcu/nocb: Simplify (de-)offloading state machine 2024-09-09 00:03:55 +05:30
rcu_segcblist.h rcu: Remove unused declaration rcu_segcblist_offload() 2024-10-22 15:36:56 +02:00
rcuscale.c mm: replace (20 - PAGE_SHIFT) with common macros for pages<->MB conversion 2025-09-13 16:54:42 -07:00
rcutorture.c Merge branch 'rcu/misc' into next 2025-11-30 22:20:33 +01:00
refscale.c Merge branch 'rcu/refscale' into next 2025-11-28 23:30:38 +01:00
srcutiny.c srcu: Permit Tiny SRCU srcu_read_unlock() with interrupts disabled 2025-11-05 23:58:11 +01:00
srcutree.c srcu: Create an SRCU-fast-updown API 2025-11-27 14:22:31 +01:00
sync.c rcu: Eliminate lockless accesses to rcu_sync->gp_count 2024-07-04 13:48:57 -07:00
tasks.h rcu: replace use of system_wq with system_percpu_wq 2025-09-23 02:01:18 -07:00
tiny.c sched: Provide and use set_need_resched_current() 2025-11-20 22:26:09 +01:00
tree.c RCU pull request for v6.19 2025-12-03 12:18:07 -08:00
tree.h rcu: Fix racy re-initialization of irq_work causing hangs 2025-08-11 08:43:49 +05:30
tree_exp.h sched: Provide and use set_need_resched_current() 2025-11-20 22:26:09 +01:00
tree_nocb.h rcu: Fix delayed execution of hurry callbacks 2025-07-18 09:25:34 +05:30
tree_plugin.h sched: Provide and use set_need_resched_current() 2025-11-20 22:26:09 +01:00
tree_stall.h sched: Provide and use set_need_resched_current() 2025-11-20 22:26:09 +01:00
update.c rcu: Mark diagnostic functions as notrace 2025-11-07 13:57:37 +01:00