Find a file
Frederic Weisbecker 0387703986 timers: Fix removed self-IPI on global timer's enqueue in nohz_full
While running in nohz_full mode, a task may enqueue a timer while the
tick is stopped. However the only places where the timer wheel,
alongside the timer migration machinery's decision, may reprogram the
next event accordingly with that new timer's expiry are the idle loop or
any IRQ tail.

However neither the idle task nor an interrupt may run on the CPU if it
resumes busy work in userspace for a long while in full dynticks mode.

To solve this, the timer enqueue path raises a self-IPI that will
re-evaluate the timer wheel on its IRQ tail. This asynchronous solution
avoids potential locking inversion.

This is supposed to happen both for local and global timers but commit:

	b2cf7507e1 ("timers: Always queue timers on the local CPU")

broke the global timers case with removing the ->is_idle field handling
for the global base. As a result, global timers enqueue may go unnoticed
in nohz_full.

Fix this with restoring the idle tracking of the global timer's base,
allowing self-IPIs again on enqueue time.

Fixes: b2cf7507e1 ("timers: Always queue timers on the local CPU")
Reported-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240318230729.15497-3-frederic@kernel.org
2024-03-19 10:14:55 +01:00
arch csky/vdso: Use generic union vdso_data_store 2024-02-20 20:56:01 +01:00
block blk-iocost: Fix an UBSAN shift-out-of-bounds warning 2024-02-08 10:11:39 -07:00
certs
crypto crypto: algif_hash - Remove bogus SGL free on zero-length error path 2024-02-02 18:08:12 +08:00
Documentation clocksource: Scale the watchdog read retries automatically 2024-02-21 12:00:42 +01:00
drivers - Fix GICv4.1 affinity update 2024-02-18 09:14:12 -08:00
fs bcachefs fixes for v6.8-rc5 2024-02-17 13:17:32 -08:00
include vdso/datapage: Quick fix - use asm/page-def.h for ARM64 2024-02-26 23:13:41 +01:00
init update workarounds for gcc "asm goto" issue 2024-02-15 11:14:33 -08:00
io_uring io_uring/net: fix multishot accept overflow handling 2024-02-14 18:30:19 -07:00
ipc
kernel timers: Fix removed self-IPI on global timer's enqueue in nohz_full 2024-03-19 10:14:55 +01:00
lib Driver core fixes for 6.8-rc5 2024-02-17 08:56:41 -08:00
LICENSES
mm mm/memory: Use exception ip to search exception tables 2024-02-12 23:04:42 +01:00
net Including fixes from can, wireless and netfilter. 2024-02-15 11:39:27 -08:00
rust
samples work around gcc bugs with 'asm goto' with outputs 2024-02-09 15:57:48 -08:00
scripts kallsyms: ignore ARMv4 thunks along with others 2024-02-15 22:44:56 +09:00
security lsm/stable-6.8 PR 20240215 2024-02-16 07:58:43 -08:00
sound ALSA: usb-audio: More relaxed check of MIDI jack names 2024-02-15 16:56:05 +01:00
tools clocksource: Scale the watchdog read retries automatically 2024-02-21 12:00:42 +01:00
usr Kbuild updates for v6.8 2024-01-18 17:57:07 -08:00
virt Generic: 2024-01-17 13:03:37 -08:00
.clang-format
.cocciconfig
.editorconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap Including fixes from can, wireless and netfilter. 2024-02-15 11:39:27 -08:00
.rustfmt.toml
COPYING
CREDITS MAINTAINERS: supplement of zswap maintainers update 2024-01-25 23:52:21 -08:00
Kbuild
Kconfig
MAINTAINERS timer_migration: Add tracepoints 2024-02-22 17:52:32 +01:00
Makefile Linux 6.8-rc5 2024-02-18 12:56:25 -08:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.