All of lore.kernel.org
 help / color / mirror / Atom feed
From: William Palacek <William.Palacek@amd.com>
To: <dri-devel@lists.freedesktop.org>
Cc: intel-xe@lists.freedesktop.org,
	"Matthew Auld" <matthew.auld@intel.com>,
	"Arunpravin Paneer Selvam" <Arunpravin.PaneerSelvam@amd.com>,
	"Sanjay Yadav" <sanjay.kumar.yadav@intel.com>,
	"Joel Fernandes" <joelagnelf@nvidia.com>,
	"Christian König" <christian.koenig@amd.com>,
	linux-kernel@vger.kernel.org,
	"William Palacek" <William.Palacek@amd.com>
Subject: [PATCH v5 0/2] gpu/buddy: find range-biased blocks in the free trees
Date: Thu, 19 Nov 2026 08:18:08 -0500	[thread overview]
Message-ID: <cover.1795094029.git.William.Palacek@amd.com> (raw)

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(-)

-- 
2.43.0


             reply	other threads:[~2026-11-19 13:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 13:18 William Palacek [this message]
2026-11-19 13:18 ` [PATCH v5 1/2] gpu/buddy: find range-biased blocks in the free trees William Palacek
2026-11-19 13:18 ` [PATCH v5 2/2] gpu/tests/buddy: add range-biased allocation tests William Palacek
2026-11-19 17:12 ` ✓ CI.KUnit: success for gpu/buddy: find range-biased blocks in the free trees Patchwork
2026-11-19 17:48 ` ✓ Xe.CI.BAT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1795094029.git.William.Palacek@amd.com \
    --to=william.palacek@amd.com \
    --cc=Arunpravin.PaneerSelvam@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=joelagnelf@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew.auld@intel.com \
    --cc=sanjay.kumar.yadav@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.