HomeFreeBSD

sched_ule: Enable preemption of curthread in the load balancer

Description

sched_ule: Enable preemption of curthread in the load balancer

The load balancer executes from statclock and periodically tries to move
threads among CPUs in order to balance load. It may move a thread to
the current CPU (the loader balancer always runs on CPU 0). When it
does so, it may need to schedule preemption of the interrupted thread.
Use sched_setpreempt() to do so, same as sched_add().

PR: 264867
Reviewed by: mav, kib, jhb
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35744

Details

Provenance
markjAuthored on Jul 14 2022, 2:23 PM
Reviewer
mav
Differential Revision
D35744: sched_ule: Enable preemption of curthread in the load balancer
Parents
rG6d3f74a14a83: sched_ule: Fix racy loads of pc_curthread
Branches
Unknown
Tags
Unknown