aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
diff options
context:
space:
mode:
authorIan Rogers <[email protected]>2024-07-03 17:21:17 +0000
committerNamhyung Kim <[email protected]>2024-07-08 05:26:29 +0000
commit7b2450bb40275802b73593331b0db2fc147ae2b7 (patch)
tree8f0f4360e28d563309c0add92ccde22521272ee2 /drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
parentperf comm str: Avoid sort during insert (diff)
downloadkernel-7b2450bb40275802b73593331b0db2fc147ae2b7.tar.gz
kernel-7b2450bb40275802b73593331b0db2fc147ae2b7.zip
perf dsos: When adding a dso into sorted dsos maintain the sort order
dsos__add would add at the end of the dso array possibly requiring a later find to re-sort the array. Patterns of find then add were becoming O(n*log n) due to the sorts. Change the add routine to be O(n) rather than O(1) but to maintain the sorted-ness of the dsos array so that later finds don't need the O(n*log n) sort. Fixes: 3f4ac23a9908 ("perf dsos: Switch backing storage to array from rbtree/list") Reported-by: Namhyung Kim <[email protected]> Signed-off-by: Ian Rogers <[email protected]> Cc: Steinar Gunderson <[email protected]> Cc: Athira Rajeev <[email protected]> Cc: Matt Fleming <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c')
0 files changed, 0 insertions, 0 deletions