public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: "Felix Kuehling" <felix.kuehling@amd.com>,
	"Mukul Joshi" <mukul.joshi@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Sasha Levin" <sashal@kernel.org>,
	Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch,
	Philip.Yang@amd.com, Hongkun.Zhang@amd.com,
	Arunpravin.PaneerSelvam@amd.com,
	pierre-eric.pelloux-prayer@amd.com, Jun.Ma2@amd.com,
	Wang.Beyond@amd.com, amd-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org
Subject: [PATCH AUTOSEL 6.1 07/12] drm/amdgpu: Update BO eviction priorities
Date: Tue,  7 May 2024 19:00:09 -0400	[thread overview]
Message-ID: <20240507230031.391436-7-sashal@kernel.org> (raw)
In-Reply-To: <20240507230031.391436-1-sashal@kernel.org>

From: Felix Kuehling <felix.kuehling@amd.com>

[ Upstream commit b0b13d532105e0e682d95214933bb8483a063184 ]

Make SVM BOs more likely to get evicted than other BOs. These BOs
opportunistically use available VRAM, but can fall back relatively
seamlessly to system memory. It also avoids SVM migrations evicting
other, more important BOs as they will evict other SVM allocations
first.

Signed-off-by: Felix Kuehling <felix.kuehling@amd.com>
Acked-by: Mukul Joshi <mukul.joshi@amd.com>
Tested-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index cde2fd2f71171..a5adae8b43d47 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -585,6 +585,8 @@ int amdgpu_bo_create(struct amdgpu_device *adev,
 	else
 		amdgpu_bo_placement_from_domain(bo, bp->domain);
 	if (bp->type == ttm_bo_type_kernel)
+		bo->tbo.priority = 2;
+	else if (!(bp->flags & AMDGPU_GEM_CREATE_DISCARDABLE))
 		bo->tbo.priority = 1;
 
 	if (!bp->destroy)
-- 
2.43.0


  parent reply	other threads:[~2024-05-07 23:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-07 23:00 [PATCH AUTOSEL 6.1 01/12] wifi: mac80211: don't use rate mask for scanning Sasha Levin
2024-05-07 23:00 ` [PATCH AUTOSEL 6.1 02/12] wifi: mac80211: ensure beacon is non-S1G prior to extracting the beacon timestamp field Sasha Levin
2024-05-07 23:00 ` [PATCH AUTOSEL 6.1 03/12] wifi: cfg80211: fix the order of arguments for trace events of the tx_rx_evt class Sasha Levin
2024-05-07 23:00 ` [PATCH AUTOSEL 6.1 04/12] dt-bindings: rockchip: grf: Add missing type to 'pcie-phy' node Sasha Levin
2024-05-07 23:00 ` [PATCH AUTOSEL 6.1 05/12] net: usb: qmi_wwan: add Telit FN920C04 compositions Sasha Levin
2024-05-07 23:00 ` [PATCH AUTOSEL 6.1 06/12] drm/amd/display: Set color_mgmt_changed to true on unsuspend Sasha Levin
2024-05-07 23:00 ` Sasha Levin [this message]
2024-05-07 23:00 ` [PATCH AUTOSEL 6.1 08/12] drm/amdgpu: Fix the ring buffer size for queue VM flush Sasha Levin
2024-05-07 23:00 ` [PATCH AUTOSEL 6.1 09/12] drm/amdgpu/mes: fix use-after-free issue Sasha Levin
2024-05-07 23:00 ` [PATCH AUTOSEL 6.1 10/12] LoongArch: Lately init pmu after smp is online Sasha Levin
2024-05-07 23:00 ` [PATCH AUTOSEL 6.1 11/12] selftests: sud_test: return correct emulated syscall value on RISC-V Sasha Levin
2024-05-07 23:00 ` [PATCH AUTOSEL 6.1 12/12] sched/isolation: Fix boot crash when maxcpus < first housekeeping CPU Sasha Levin

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=20240507230031.391436-7-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=Arunpravin.PaneerSelvam@amd.com \
    --cc=Hongkun.Zhang@amd.com \
    --cc=Jun.Ma2@amd.com \
    --cc=Philip.Yang@amd.com \
    --cc=Wang.Beyond@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=felix.kuehling@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mukul.joshi@amd.com \
    --cc=pierre-eric.pelloux-prayer@amd.com \
    --cc=stable@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox