zephyr/kernel
Kalle Kietäväinen a2eb78c03b kernel: sched: Fix meta-IRQ preemption tracking for the idle thread
When the PM subsystem is enabled, the idle thread locks the scheduler for
the duration the system is suspended. If a meta-IRQ preempts the idle
thread in this state, the idle thread is tracked in `metairq_preempted`.
However, when returning from the preemption, the idle thread is not removed
from `metairq_preempted`, unlike all the other threads. As a result, the
scheduler keeps running the idle thread even if there are higher priority
threads ready to run.

This change treats the idle thread the same way as all other threads when
returning from a meta-IRQ preemption.

Fixes #64705

Signed-off-by: Kalle Kietäväinen <kalle.kietavainen@silabs.com>
2025-01-27 13:26:20 +01:00
..
include kernel: uninline z_dummy_thread_init() 2025-01-15 07:19:40 +01:00
paging
atomic_c.c
banner.c
busy_wait.c
CMakeLists.txt kernel: Rewrite k_pipe_* API 2025-01-17 19:43:44 +01:00
compiler_stack_protect.c security: Add default stack protection level 2024-12-20 12:37:20 +01:00
condvar.c kernel: Apply 'unlikely' attribute 2024-10-15 04:06:32 -04:00
cpu_mask.c kernel: Simplify k_thread_cpu_pin() 2024-09-20 09:02:38 +02:00
device.c device: Optimize device_get_binding search efficiency 2024-11-27 08:18:30 +01:00
dynamic_disabled.c
dynamic.c kernel: dynamic: simplify dynamic stack allocation 2024-12-11 21:33:00 +01:00
errno.c Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
events.c
fatal.c Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
float.c
futex.c
idle.c Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
init_static.c
init.c security: Additional option for stack canaries 2024-12-20 12:37:20 +01:00
ipi.c Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
irq_offload.c
Kconfig kernel: Rewrite k_pipe_* API 2025-01-17 19:43:44 +01:00
Kconfig.device
Kconfig.init init: support per-core init hook 2024-11-16 14:04:25 -05:00
Kconfig.mem_domain
Kconfig.obj_core kernel: Rewrite k_pipe_* API 2025-01-17 19:43:44 +01:00
Kconfig.smp kernel: remove CONFIG_MP_NUM_CPUS 2024-09-19 18:28:37 +01:00
Kconfig.vm kernel: mmu: support for on-demand mappings 2024-08-26 17:25:41 -04:00
kheap.c kernel: Add k_heap_calloc 2024-12-30 17:32:03 +01:00
mailbox.c Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
main_weak.c
mem_domain.c Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
mem_slab.c Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
mempool.c Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
mmu.c Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
msg_q.c Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
mutex.c Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
nothread.c kernel: fix k_sleep in no multi-threading mode 2024-11-16 14:07:41 -05:00
obj_core.c
pipe.c kernel/pipe: squash compiler warning 2025-01-22 05:39:01 +01:00
pipes.c tracing: k_pipe: Add tracing support for reworked k_pipe API 2025-01-17 19:43:44 +01:00
poll.c kernel: poll: Allow 0 events for submitted work 2025-01-21 19:44:07 +01:00
priority_queues.c
queue.c Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
sched.c kernel: sched: Fix meta-IRQ preemption tracking for the idle thread 2025-01-27 13:26:20 +01:00
sem.c kernel: Apply 'unlikely' attribute 2024-10-15 04:06:32 -04:00
smp.c kernel: mark z_smp_current_get() with the const attribute 2025-01-10 07:49:08 +01:00
spinlock_validate.c Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
stack.c Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
system_work_q.c
thread_monitor.c style: kernel: comply with MISRA C:2012 Rule 15.6 2024-09-11 07:40:35 -04:00
thread.c kernel: uninline z_dummy_thread_init() 2025-01-15 07:19:40 +01:00
timeout.c kernel: timeout: ensure next timeout is set when aborting the first timeout 2025-01-06 22:36:07 +01:00
timer.c
timeslicing.c Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
usage.c
userspace_handler.c Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
userspace.c Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
version.c
work.c Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
xip.c security: Additional option for stack canaries 2024-12-20 12:37:20 +01:00