sched_shim: restore kern.ccpu sysctl
It is apparently should be considered part of the ABI, and is used by
the base top(1). But do not declare the ccpu variable in headers, it is
needed only by 4bsd. So put the variable definition into sched_shim.c to
make the kernel buildable without SCHED_4BSD.
Reviewed by: olce
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54831
cpu_switch(): unconditionally wait on the blocked mutex transient
It is nop for 4BSD.
Reviewed by: olce
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54831
net/iflib.c: move out scheduler-depended code into the hook
Add sched_find_l2_neighbor(). This really should be not
scheduler-depended, in does not have anything to do with scheduler at
all. But for now keep the same code structure.
Reviewed by: olce
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54831
x86/local_apic.c: remove direct SCHED_ULE use
Move the code to decide on the timer accounting into the scheduler hook.
Since there were no inclusion of opt_sched.h, it is probably done
unconditionally anyway.
Reviewed by: olce
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54831
sys: enable both SCHED_ULE and SCHED_4BSD for some configs
Globally enable both schedulers for LINT.
Enable both schedulers for GENERIC on amd64.
Reviewed by: olce
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54831
sysctl kern.sched.ule.topology_spec: allow to run if ULE is not initialized
Reviewed by: olce
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54831
x86/cpu_machdep.c: unconditionally fence
For !SCHED_ULE, even if the fence is not needed, it is harmless.
Reviewed by: olce
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54831
kern/sched: move duplicate preemption stat vars into sched_shim.c
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54831