aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
diff options
context:
space:
mode:
authorZhongqiu Han <[email protected]>2024-12-31 15:01:15 +0000
committerThomas Gleixner <[email protected]>2025-01-16 08:04:23 +0000
commit3ec955713d9617059d2fc8f2816d0b95ace72256 (patch)
treeae02bc0e4443638b5a96d1faaf56a56a34b3d52a /drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
parenttimekeeping: Remove unused ktime_get_fast_timestamps() (diff)
downloadkernel-3ec955713d9617059d2fc8f2816d0b95ace72256.tar.gz
kernel-3ec955713d9617059d2fc8f2816d0b95ace72256.zip
timers: Optimize get_timer_[this_]cpu_base()
If a timer is deferrable and NO_HZ_COMMON is enabled, get_timer_cpu_base() and get_timer_this_cpu_base() invoke per_cpu_ptr() and this_cpu_ptr() twice. While this seems to be cheap, get_timer_cpu_base() can be called in a loop in lock_timer_base(). Optimize the functions by updating the base index for deferrable timers and retrieving the actual base pointer once. In both cases the resulting assembly code of those helpers becomes smaller, which results in a ~30% execution time reduction for a lock_timer_base() micro bench mark. Signed-off-by: Zhongqiu Han <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Frederic Weisbecker <[email protected]> Link: https://lore.kernel.org/all/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c')
0 files changed, 0 insertions, 0 deletions