You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the way most of the scheds seem to work for assigning work to specific CPUs/threads is they query the cache layout, numa/topo layout or go off of frequency or some combination of all of those.
AMD CPUs in particular already have a ranking per CPU core called pref core. It should be preferable in most cases to use these values over self-baked topo rules for the following reasons:
There are built in heuristics we don't have access to that goes into these values e.g all cores report the same max freq but will actually boost to different max freq.
These can change at runtime via tunables e.g for dual CCD 3D vCache CPUs the user can tell the kernel to either rank for frequency or for cache (I have written a tool to do this for games based on profiles as some games want cache and others frequency).
AMD can update these to factor in new things or alter how they are calculated at any time, so by using it you get that for free without needing to modify scheduler code in the future.
I'll be making a PR shortly to add these values in topology.rs and would not be against also updating a sched or two to make use of it but I might need a bit of guidance on what are the appropriate ones to do so with and the preferred way of doing it.
The text was updated successfully, but these errors were encountered:
Currently the way most of the scheds seem to work for assigning work to specific CPUs/threads is they query the cache layout, numa/topo layout or go off of frequency or some combination of all of those.
AMD CPUs in particular already have a ranking per CPU core called pref core. It should be preferable in most cases to use these values over self-baked topo rules for the following reasons:
You can see these values by doing:
grep -v /sys/devices/system/cpu/cpu*/cpufreq/amd_pstate_prefcore_ranking
It should output something like:
/sys/devices/system/cpu/cpu1/cpufreq/amd_pstate_prefcore_ranking:231 /sys/devices/system/cpu/cpu2/cpufreq/amd_pstate_prefcore_ranking:226 /sys/devices/system/cpu/cpu3/cpufreq/amd_pstate_prefcore_ranking:236 /sys/devices/system/cpu/cpu4/cpufreq/amd_pstate_prefcore_ranking:221 /sys/devices/system/cpu/cpu5/cpufreq/amd_pstate_prefcore_ranking:236 /sys/devices/system/cpu/cpu6/cpufreq/amd_pstate_prefcore_ranking:216 /sys/devices/system/cpu/cpu7/cpufreq/amd_pstate_prefcore_ranking:206 /sys/devices/system/cpu/cpu8/cpufreq/amd_pstate_prefcore_ranking:171 /sys/devices/system/cpu/cpu9/cpufreq/amd_pstate_prefcore_ranking:196 /sys/devices/system/cpu/cpu10/cpufreq/amd_pstate_prefcore_ranking:201 /sys/devices/system/cpu/cpu11/cpufreq/amd_pstate_prefcore_ranking:181 /sys/devices/system/cpu/cpu12/cpufreq/amd_pstate_prefcore_ranking:176 /sys/devices/system/cpu/cpu13/cpufreq/amd_pstate_prefcore_ranking:186 /sys/devices/system/cpu/cpu14/cpufreq/amd_pstate_prefcore_ranking:166 /sys/devices/system/cpu/cpu15/cpufreq/amd_pstate_prefcore_ranking:191 /sys/devices/system/cpu/cpu16/cpufreq/amd_pstate_prefcore_ranking:211 /sys/devices/system/cpu/cpu17/cpufreq/amd_pstate_prefcore_ranking:231 /sys/devices/system/cpu/cpu18/cpufreq/amd_pstate_prefcore_ranking:226 /sys/devices/system/cpu/cpu19/cpufreq/amd_pstate_prefcore_ranking:236 /sys/devices/system/cpu/cpu20/cpufreq/amd_pstate_prefcore_ranking:221 /sys/devices/system/cpu/cpu21/cpufreq/amd_pstate_prefcore_ranking:236 /sys/devices/system/cpu/cpu22/cpufreq/amd_pstate_prefcore_ranking:216 /sys/devices/system/cpu/cpu23/cpufreq/amd_pstate_prefcore_ranking:206 /sys/devices/system/cpu/cpu24/cpufreq/amd_pstate_prefcore_ranking:171 /sys/devices/system/cpu/cpu25/cpufreq/amd_pstate_prefcore_ranking:196 /sys/devices/system/cpu/cpu26/cpufreq/amd_pstate_prefcore_ranking:201 /sys/devices/system/cpu/cpu27/cpufreq/amd_pstate_prefcore_ranking:181 /sys/devices/system/cpu/cpu28/cpufreq/amd_pstate_prefcore_ranking:176 /sys/devices/system/cpu/cpu29/cpufreq/amd_pstate_prefcore_ranking:186 /sys/devices/system/cpu/cpu30/cpufreq/amd_pstate_prefcore_ranking:166 /sys/devices/system/cpu/cpu31/cpufreq/amd_pstate_prefcore_ranking:191
I'll be making a PR shortly to add these values in topology.rs and would not be against also updating a sched or two to make use of it but I might need a bit of guidance on what are the appropriate ones to do so with and the preferred way of doing it.
The text was updated successfully, but these errors were encountered: