Module Name: src Committed By: mrg Date: Fri Jan 17 04:11:33 UTC 2025
Modified Files: src/sys/kern: kern_cpu.c kern_runq.c sched_4bsd.c src/sys/sys: cpu.h Log Message: partly prepare for more than 2-level CPU speed scheduler support put the calls behind looking at SPCF_IDLE and SPCF_1STCLASS mostly behind functions that can grow support for more than 2 CPU classes. 4 new functions, with 2 of them just simple aliases for the 1st: bool cpu_is_type(struct cpu_info *ci, int wanted); bool cpu_is_idle_1stclass(struct cpu_info *ci) bool cpu_is_1stclass(struct cpu_info *ci) bool cpu_is_better(struct cpu_info *ci1, struct cpu_info *ci2); with this in place, we can retain the desire to run on 1st-class by preference, while also expanding cpu_is_better() to handle multiple non 1st-class CPUs. ultimately, i envision seeing a priority number where we can mark the fastest turbo-speed cores ahead of others, for the case we can detect this. XXX: use struct schedstate_percpu instead of cpu_info? NFCI. To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98 src/sys/kern/kern_cpu.c cvs rdiff -u -r1.70 -r1.71 src/sys/kern/kern_runq.c cvs rdiff -u -r1.46 -r1.47 src/sys/kern/sched_4bsd.c cvs rdiff -u -r1.54 -r1.55 src/sys/sys/cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.