zephyr/kernel
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jinming Zhao 22d76caba5 kernel: sched: optimize scheduling IPIs for idle CPU wakeups
Add CONFIG_IPI_OPTIMIZE_IDLE to avoid waking multiple idle CPUs for a
single runnable thread. Select one active, affinity-compatible idle CPU
and record which thread its outstanding scheduling opportunity covers.

Track coverage with a reserved CPU bitmap and a per-CPU target array.
Each idle CPU and runnable thread can have at most one reservation. The
mapping represents coverage rather than binding: any CPU may select any
eligible runnable thread.

When a reserved CPU selects a different thread, transfer the selected
thread's existing reservation to the original target when possible.
Otherwise, issue a replacement IPI for the still-runnable target. Clear
reservations when their target leaves the run queue.

Apply the same optimization to MetaIRQ wakeups. The MetaIRQ can preempt
its local waker while one idle CPU is notified to run the displaced
preemptible work.

Signed-off-by: Jinming Zhao <jinmzhao@qti.qualcomm.com>
2026-09-01 11:03:59 +01:00
..
include kernel: sched: optimize scheduling IPIs for idle CPU wakeups 2026-09-01 11:03:59 +01:00
paging kernel: mm: rename z_num_pagefaults_get to k_mem_num_* 2024-06-12 21:13:26 -04:00
smp kernel: sched: optimize scheduling IPIs for idle CPU wakeups 2026-09-01 11:03:59 +01:00
sys kernel: thread_entry: fix include for TLS stack canaries 2026-08-19 18:41:05 -04:00
userspace kernel: userspace: Add z_waitq_head_locked() 2026-08-21 16:17:54 +02:00
busy_wait.c kernel: timer: Include include/zephyr/sys/clock.h 2026-07-30 07:45:05 -05:00
CMakeLists.txt kernel: move the sleep API declarations to their own header 2026-08-20 08:52:31 +02:00
compiler_stack_protect.c kernel: fix doxygen warnings exposed by adding kernel/ to docs INPUT 2026-07-01 17:05:28 -04:00
condvar.c kernel: obj_core: register object types from a single init point 2026-07-01 23:45:35 -04:00
deadline.c kernel: Update _sched_spinlock comment references 2026-08-21 16:17:54 +02:00
device.c kernel: device: restrict the device_deinit syscall to driver objects 2026-08-10 09:14:56 -07:00
dynamic.c kernel: dynamic: fix kernel stack size overflow 2026-08-21 16:20:34 +02:00
dynamic_disabled.c kernel: dynamic: declare dynamic stubs when disabled 2023-07-24 12:59:43 -04:00
events.c kernel: Update _sched_spinlock comment references 2026-08-21 16:17:54 +02:00
fatal.c sys: printk: stop locking once a fatal error is being reported 2026-08-19 17:09:07 +01:00
float.c build: namespace the generated headers with zephyr/ 2024-05-28 22:03:55 +02:00
idle.c kernel: timeout: report the no-deadline case from the idle path 2026-08-12 19:27:28 -04:00
init.c kernel: init: remove reference to legacy api 2026-08-26 18:14:02 -07:00
irq_offload.c kernel: add closing comments to config endifs 2024-03-25 18:03:31 -04:00
Kconfig kernel: add Pugh skip list timeout backend 2026-08-30 16:43:01 -04:00
Kconfig.device kernel: Kconfig.device: fix CONFIG_DEVICE_DEINIT_SUPPORT help text 2026-03-08 16:36:39 +01:00
Kconfig.init kernel: Kconfig: remove prompts from SoC and Board Hooks 2026-08-27 21:26:07 +01:00
Kconfig.obj_core kernel: remove duplicate config OBJ_CORE_SEM 2026-07-27 11:45:01 -07:00
Kconfig.vm kernel: mmu: remove LINKER_GENERIC_SECTIONS_PRESENT_AT_BOOT 2026-06-23 09:11:08 -04:00
kheap.c kernel: kheap: keep static heap init as a PRE_KERNEL_1 SYS_INIT 2026-07-06 19:42:44 -04:00
mailbox.c kernel: Fix race in mbox_message_dispose() 2026-08-18 20:22:32 -04:00
main_weak.c kernel: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
mem_slab.c kernel: kheap, mem_slab, mailbox: use kernel init hooks 2026-07-06 15:10:55 -04:00
mempool.c kernel: k_free() no longer calls z_waitq_head() 2026-08-21 16:17:54 +02:00
mmu.c sys: sflist: make flag capacity ABI-dependent 2026-08-31 21:36:01 -04:00
msg_q.c kernel: userspace: Add z_waitq_head_locked() 2026-08-21 16:17:54 +02:00
mutex.c kernel: userspace: Add z_waitq_head_locked() 2026-08-21 16:17:54 +02:00
nothread.c tracing: give k_sleep_ticks() its own trace point 2026-08-20 08:52:31 +02:00
obj_core.c kernel: obj_core: name the walk callback parameters 2026-08-17 10:26:20 +02:00
pipe.c kernel: rename the reserved 'exit' labels to 'out' 2026-08-11 17:08:24 -04:00
poll.c kernel: poll: Remove redundant timeout check 2026-08-02 11:43:59 -04:00
priority_queues.c kernel: priority queues: declare as static inlines 2024-04-22 16:40:11 -04:00
queue.c sys: sflist: make flag capacity ABI-dependent 2026-08-31 21:36:01 -04:00
sched.c kernel: sched: optimize scheduling IPIs for idle CPU wakeups 2026-09-01 11:03:59 +01:00
scheduler.c kernel: Update _sched_spinlock comment references 2026-08-21 16:17:54 +02:00
sem.c kernel: add configurable striped semaphore locking 2026-08-27 22:11:20 -04:00
sleep.c kernel: Add and use z_swap_locked() 2026-08-21 16:17:54 +02:00
spinlock_validate.c kernel: spinlock: add z_assert_can_swap() for context-switch validation 2026-06-15 18:35:34 -04:00
stack.c kernel: stack: fix allocation size overflow 2026-08-22 19:20:09 -04:00
sys_clock_hw_cycles.c kernel: refactor sys_clock_hw_cycles_per_sec runtime support 2026-02-20 13:31:07 +01:00
system_work_q.c kernel: system_work_q: register init via kernel init hook 2026-07-06 15:10:55 -04:00
thread.c kernel: Add and use z_reschedule_locked() 2026-08-21 16:17:54 +02:00
thread_monitor.c kernel: thread_monitor: reafactor and remove duplicate code 2025-04-04 07:42:20 +02:00
timeout.c kernel: add Pugh skip list timeout backend 2026-08-30 16:43:01 -04:00
timeout_bucket.h kernel: timeout: add bucketed delta-list backend 2026-07-09 18:02:12 -04:00
timeout_list.h kernel: timeout: factor delta-list queue into a pluggable backend 2026-07-09 18:02:12 -04:00
timeout_minheap.h kernel: timeout: add min-heap backend 2026-07-09 18:02:12 -04:00
timeout_skiplist.h kernel: add Pugh skip list timeout backend 2026-08-30 16:43:01 -04:00
timeout_wheel.h kernel: timeout: add timer-wheel backend 2026-07-09 18:02:12 -04:00
timer.c kernel: userspace: Add z_waitq_head_locked() 2026-08-21 16:17:54 +02:00
timeslicing.c kernel: Add private kernel header file kspinlock.h 2026-08-21 16:17:54 +02:00
usage.c kernel: usage: fix unused-variable warning when THREAD_USAGE_ALL=n 2026-08-19 17:12:24 +01:00
version.c build: namespace the generated headers with zephyr/ 2024-05-28 22:03:55 +02:00
work.c toolchain: fix deprecation warning for iar 2026-08-12 13:11:27 -04:00