aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
diff options
context:
space:
mode:
authorDawei Li <[email protected]>2024-03-15 01:59:16 +0000
committerIngo Molnar <[email protected]>2024-05-17 07:49:44 +0000
commit72bffbf57c5247ac6146d1103ef42e9f8d094bc8 (patch)
tree2eaf427114098793768a7a252c9a49690e76799f /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
parentdocs: cgroup-v1: Clarify that domain levels are system-specific (diff)
downloadkernel-72bffbf57c5247ac6146d1103ef42e9f8d094bc8.tar.gz
kernel-72bffbf57c5247ac6146d1103ef42e9f8d094bc8.zip
sched/fair: Fix initial util_avg calculation
Change se->load.weight to se_weight(se) in the calculation for the initial util_avg to avoid unnecessarily inflating the util_avg by 1024 times. The reason is that se->load.weight has the unit/scale as the scaled-up load, while cfs_rg->avg.load_avg has the unit/scale as the true task weight (as mapped directly from the task's nice/priority value). With CONFIG_32BIT, the scaled-up load is equal to the true task weight. With CONFIG_64BIT, the scaled-up load is 1024 times the true task weight. Thus, the current code may inflate the util_avg by 1024 times. The follow-up capping will not allow the util_avg value to go wild. But the calculation should have the correct logic. Signed-off-by: Dawei Li <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Reviewed-by: Vincent Guittot <[email protected]> Reviewed-by: Vishal Chourasia <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
0 files changed, 0 insertions, 0 deletions