From: Matthew Brost <matthew.brost@intel.com>
To: intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Carlos Santa" <carlos.santa@intel.com>,
"Matthew Auld" <matthew.auld@intel.com>,
"Andi Shyti" <andi.shyti@linux.intel.com>
Subject: [PATCH v4 5/6] drm/xe: Set TTM device beneficial_order to 9 (2M)
Date: Thu, 30 Apr 2026 12:18:08 -0700 [thread overview]
Message-ID: <20260430191809.2142544-6-matthew.brost@intel.com> (raw)
In-Reply-To: <20260430191809.2142544-1-matthew.brost@intel.com>
Set the TTM device beneficial_order to 9 (2M), which is the sweet
spot for Xe when attempting reclaim on system memory BOs, as it matches
the large GPU page size. This ensures reclaim is attempted at the most
effective order for the driver.
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Carlos Santa <carlos.santa@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
---
drivers/gpu/drm/xe/xe_device.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 4b45b617a039..3f719ab08d1c 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -500,7 +500,8 @@ struct xe_device *xe_device_create(struct pci_dev *pdev,
err = ttm_device_init(&xe->ttm, &xe_ttm_funcs, xe->drm.dev,
xe->drm.anon_inode->i_mapping,
- xe->drm.vma_offset_manager, 0);
+ xe->drm.vma_offset_manager,
+ TTM_ALLOCATION_POOL_BENEFICIAL_ORDER(get_order(SZ_2M)));
if (WARN_ON(err))
return ERR_PTR(err);
--
2.34.1
next prev parent reply other threads:[~2026-04-30 19:18 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-30 19:18 [PATCH v4 0/6] mm, drm/ttm, drm/xe: Avoid reclaim/eviction loops under fragmentation Matthew Brost
2026-04-30 19:18 ` [PATCH v4 1/6] mm: Wire up order in shrink_control Matthew Brost
2026-04-30 19:18 ` [PATCH v4 2/6] mm: Introduce zone_maybe_fragmented_in_shrinker() Matthew Brost
2026-05-01 0:50 ` Santa, Carlos
2026-05-01 19:08 ` PATCH v4 0/6] mm, drm/ttm, drm/xe: Avoid reclaim/eviction loops under fragmentation Kenneth Crudup
2026-05-01 20:00 ` Matthew Brost
2026-05-01 20:05 ` Kenneth Crudup
2026-05-01 21:10 ` Matthew Brost
2026-05-01 22:33 ` Matthew Brost
2026-05-01 23:23 ` Kenneth Crudup
2026-04-30 19:18 ` [PATCH v4 3/6] drm/ttm: Issue direct reclaim at beneficial_order Matthew Brost
2026-05-04 7:16 ` Christian König
2026-04-30 19:18 ` [PATCH v4 4/6] drm/ttm: Introduce ttm_bo_shrink_kswap_maybe_fragmented() Matthew Brost
2026-04-30 19:18 ` Matthew Brost [this message]
2026-04-30 19:18 ` [PATCH v4 6/6] drm/xe: Avoid shrinker reclaim from kswapd under fragmentation Matthew Brost
2026-04-30 20:04 ` ✗ CI.checkpatch: warning for mm, drm/ttm, drm/xe: Avoid reclaim/eviction loops under fragmentation (rev3) Patchwork
2026-04-30 20:06 ` ✓ CI.KUnit: success " Patchwork
2026-04-30 21:15 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-30 23:01 ` [PATCH v4 0/6] mm, drm/ttm, drm/xe: Avoid reclaim/eviction loops under fragmentation Andrew Morton
2026-05-01 6:28 ` Matthew Brost
2026-05-01 12:51 ` Andrew Morton
2026-05-01 1:42 ` Dave Chinner
2026-05-01 7:09 ` Matthew Brost
2026-05-01 8:00 ` ✓ Xe.CI.FULL: success for mm, drm/ttm, drm/xe: Avoid reclaim/eviction loops under fragmentation (rev3) 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=20260430191809.2142544-6-matthew.brost@intel.com \
--to=matthew.brost@intel.com \
--cc=andi.shyti@linux.intel.com \
--cc=carlos.santa@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.auld@intel.com \
--cc=thomas.hellstrom@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox