Preempt a running proc even if there is no other process/thread queued
authorclaudio <claudio@openbsd.org>
Wed, 30 Aug 2023 09:02:38 +0000 (09:02 +0000)
committerclaudio <claudio@openbsd.org>
Wed, 30 Aug 2023 09:02:38 +0000 (09:02 +0000)
commit3a63f5a8da8dffdd6c93401ac0dcdc6ea494104e
treecbb75ab08d6cba92251c89a509fc91932af35738
parent018df1c552c82a2f27641c03d04d5ba187ca62b7
Preempt a running proc even if there is no other process/thread queued
on that CPU's runqueue. This way mi_switch() is invoked which is necessary
to a) signal srm that the cpu changed context b) runtime stats are updated
c) requests to stop the CPU are checked.
This should fix the issue reported by Eric Wong (e at 80x24 org) that
RLIMIT_CPU is unreliable on idle systems.
OK kettenis@ cheloha@
sys/kern/sched_bsd.c