linux/kernel/rcu
Linus Torvalds a53fcff8fc Updates for the NOHZ subsystem:
- Fix a long standing TOCTOU in get_cpu_sleep_time_us()
 
   - Make the CPU offline NOHZ handling more robust by disabling NOHZ on the
     outgoing CPU early instead of creating unneeded state which needs to be
     undone.
 
   - Unify idle CPU time accounting instead of having two different
     accounting mechanisms. These two different mechanisms are not really
     independent, but the different properties can in the worst case cause
     that gloabl idle time can be observed going backwards.
 
   - Consolidate the idle/iowait time retrieval interfaces instead of
     converting back and forth between them.
 
   - Make idle interrupt time accounting more robust. The original code
     assumes that interrupt time accouting is enabled and therefore stops
     elapsing idle time while an interrupt is handled in NOHZ dyntick
     state. That assumption is not correct as interrupt time accounting can
     be disabled at compile and runtime.
 
   - Fix an accounting error between dyntick idle time and dyntick idle
     steal time. The stolen time is not accounted and therefore idle time
     becomes inaccurate. The stolen time is now accounted after the fact as
     there is no way to predict the steal time upfront.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAmotm7YQHHRnbHhAa2Vy
 bmVsLm9yZwAKCRCmGPVMDXSYoWEOEADG/RzW9l7fwUcsnubRyHER7GoIEZGP/VO/
 nLQnI+M1LwdVyK8Oq8WntSnqOGevVdUKQlLFYMXdwovS8TWCi7PWcQeMIsfJnwT/
 6ugwo4E3mSBcseMjN8eHkEYH+1YmN6JSYQ+5eXT0JUXUxJlMFgtv3ZnTbQOF6Y3k
 Nkz1THojzdgTMn6WU/01AOXDR8Nhb2gOOQLDF/1ItZWnsDhbrDE2l99OaAELfeIo
 8BZFQBPYRfuR8HaGgd8m2OPGnbw+cXMHUrTscMMQvmYv2wJVcNMB4AmVaUmGMRTR
 c3xs8QG2nUmIm72ENfe2pPDPyxy9JUJ54ro6/rLtcNQZ2wVCznhNahm6wRUa8f/0
 7gnQE5nS2SNtdpL5StDVzk2+AZl6SrU8+ss51f1owPcNwKs+tt9XE+GVyL5wZpC8
 IeD2SzVQLIIc0+ZvIkt9n76lLJkiLZkmt6UAnvhiz5NNn8XQlgC/4Uadk9CwC5vx
 t6swpE06D7vx7lm+ycfYUl6VPje5g/YvkkDFJqJulIlEDNpvb85+W6lMTyO7rwVl
 ln5TzOGPp7lJDwu6dAfg0QtHcUmUIFq05FuOIRNC4ZNxkxL2XDMzoe5IHxcWzU9O
 CHFGBUNZf+30vxvKeh+rkjZalt7/vgQaxb5somGmqv8g/6SJtJyB2qlq+gqH/+lQ
 MeG8tFGtVQ==
 =+cVw
 -----END PGP SIGNATURE-----

Merge tag 'timers-nohz-2026-06-13' of gitolite.kernel.org:pub/scm/linux/kernel/git/tip/tip

Pull NOHZ updates from Thomas Gleixner:

 - Fix a long standing TOCTOU in get_cpu_sleep_time_us()

 - Make the CPU offline NOHZ handling more robust by disabling NOHZ on
   the outgoing CPU early instead of creating unneeded state which needs
   to be undone.

 - Unify idle CPU time accounting instead of having two different
   accounting mechanisms. These two different mechanisms are not really
   independent, but the different properties can in the worst case cause
   that gloabl idle time can be observed going backwards.

 - Consolidate the idle/iowait time retrieval interfaces instead of
   converting back and forth between them.

 - Make idle interrupt time accounting more robust. The original code
   assumes that interrupt time accouting is enabled and therefore stops
   elapsing idle time while an interrupt is handled in NOHZ dyntick
   state. That assumption is not correct as interrupt time accounting
   can be disabled at compile and runtime.

 - Fix an accounting error between dyntick idle time and dyntick idle
   steal time. The stolen time is not accounted and therefore idle time
   becomes inaccurate. The stolen time is now accounted after the fact
   as there is no way to predict the steal time upfront.

* tag 'timers-nohz-2026-06-13' of gitolite.kernel.org:pub/scm/linux/kernel/git/tip/tip:
  sched/cputime: Handle dyntick-idle steal time correctly
  sched/cputime: Handle idle irqtime gracefully
  sched/cputime: Provide get_cpu_[idle|iowait]_time_us() off-case
  tick/sched: Consolidate idle time fetching APIs
  tick/sched: Account tickless idle cputime only when tick is stopped
  tick/sched: Remove unused fields
  tick/sched: Move dyntick-idle cputime accounting to cputime code
  tick/sched: Remove nohz disabled special case in cputime fetch
  tick/sched: Unify idle cputime accounting
  s390/time: Prepare to stop elapsing in dynticks-idle
  powerpc/time: Prepare to stop elapsing in dynticks-idle
  sched/cputime: Correctly support generic vtime idle time
  sched/cputime: Remove superfluous and error prone kcpustat_field() parameter
  sched/idle: Handle offlining first in idle loop
  tick/sched: Fix TOCTOU in nohz idle time fetch
2026-06-15 13:48:52 +05:30
..
Kconfig rcu: Add noinstr-fast rcu_read_{,un}lock_tasks_trace() APIs 2026-01-01 16:39:46 +08:00
Kconfig.debug RCU changes for v7.1 2026-04-13 09:36:45 -07:00
Makefile
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
rcu.h rcutorture: Add a textbook-style trivial preemptible RCU 2026-03-30 15:48:13 -04:00
rcuscale.c rcuscale: Ditch rcu_scale_shutdown in favor of torture_shutdown_init() 2026-03-30 15:48:13 -04:00
rcutorture.c rcutorture: Fully test lazy RCU 2026-05-24 09:38:39 +02:00
refscale.c refscale: Ditch ref_scale_shutdown in favor of torture_shutdown_init() 2026-03-30 15:48:13 -04:00
srcutiny.c srcu: Use irq_work to start GP in tiny SRCU 2026-03-25 09:00:05 -07:00
srcutree.c srcu: Don't queue workqueue handlers to never-online CPUs 2026-05-18 12:27:18 -07:00
sync.c rcu: Eliminate lockless accesses to rcu_sync->gp_count 2024-07-04 13:48:57 -07:00
tasks.h rcu-tasks: Fix possible boot-time tests failed for the call_rcu_tasks() 2026-05-24 09:40:13 +02:00
tiny.c sched: Provide and use set_need_resched_current() 2025-11-20 22:26:09 +01:00
tree_exp.h rcu: Make expedited RCU CPU stall warnings detect stall-end races 2026-01-07 21:58:26 +08:00
tree_nocb.h rcu/nocb: reduce stack usage in nocb_gp_wait() 2026-06-02 19:43:53 +02:00
tree_plugin.h rcu: Fix rcu_read_unlock() deadloop due to softirq 2026-01-07 21:58:37 +08:00
tree_stall.h sched/cputime: Remove superfluous and error prone kcpustat_field() parameter 2026-06-02 21:27:25 +02:00
tree.c Updates for the NOHZ subsystem: 2026-06-15 13:48:52 +05:30
tree.h Merge branch 'rcu-nocb.20260123a' 2026-01-23 11:15:36 -08:00
update.c rcutorture: Add a textbook-style trivial preemptible RCU 2026-03-30 15:48:13 -04:00