Skip to content

gpu/buddy: find range-biased blocks in the free trees

William Palacek dri-devel intel-xe lkml 5 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest2 patches 0 repliesNew
  2. v43 patches 1 replySuperseded
  3. v32 patches 1 replySuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v22 patches0 repliesSuperseded
v12 patches1 replySuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2gpu/buddy: find range-biased blocks in the free treesdrivers/gpu/buddy.c include/linux/gpu_buddy.h+224 -1170 replies
2/2gpu/tests/buddy: add range-biased allocation testsdrivers/gpu/tests/gpu_buddy_test.c+67 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH v5 0/2] gpu/buddy: find range-biased blocks in the free trees

In a range-restricted allocation, the strict pass of __alloc_range_bias() still visits every free block of the other class in the range: a dirty request among many free cleared blocks steps through each of them. amdgpu restricts every VRAM allocation to its memory partition under NPS2/NPS4, so it takes this path for every KFD VRAM allocation there.

Patch 1 replaces the walk with a lookup in the offset-sorted free trees, on top of Arun's range guard code, and drops subtree_max_free_order, which nothing reads afterwards. Patch 2 adds tests for an inverted range and for the NPS4 fill pattern.

v5: squash v4 patches 1 and 2 (Arun); no code change.

v4: https://patchwork.freedesktop.org/series/178969/
v3: https://patchwork.freedesktop.org/series/178108/#rev2
v2: https://patchwork.freedesktop.org/series/178108/#rev1
v1: https://patchwork.freedesktop.org/series/176957/

William Palacek (2):
gpu/buddy: find range-biased blocks in the free trees gpu/tests/buddy: add range-biased allocation tests

 drivers/gpu/buddy.c                | 334 +++++++++++++++++++----------
 drivers/gpu/tests/gpu_buddy_test.c |  67 ++++++
 include/linux/gpu_buddy.h          |   7 -
 3 files changed, 291 insertions(+), 117 deletions(-)
Signature · 1 line
2.43.0