All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/4] drm/xe: Split the bo shrinker and adjust batch size
@ 2026-10-19  9:56 Thomas Hellström
  2026-10-19  9:56 ` [PATCH v5 1/4] drm/xe: Don't abort the shrinker walk on -EBUSY Thomas Hellström
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Thomas Hellström @ 2026-10-19  9:56 UTC (permalink / raw)
  To: intel-xe
  Cc: Thomas Hellström, Matthew Brost, Matthew Auld,
	Maarten Lankhorst

Shamelessly stolen from i915, To avoid gpu stalls for small
shrinker request, Set the shrinker batch size to the average
size of system buffer objects. Use the number of
populated struct ttm_tts to compute the average size.

However, it turned out that it may be desirable to have
different settings for purgeable and non-purgeable objects, since
purgeable objects are cheap to reclaim so split the
shrinker into one for purgeable objects and one which can shrink
both but is invoked with lower priority.

v2:
- Fix the average object size estimate to account for the full
  shrinkable and purgeable population.

v3:
- Drop the shrinker accounting double-subtraction fix from this
  series; it has been fixed and merged upstream separately.
- Patch 3/4: new patch, splitting the bo shrinker into purgeable and
  non-purgeable shrinkers, per a suggestion from Matthew Brost.
- Patch 4/4: reworked on top of the shrinker split, and the batch size
  update is now performed under the existing shrinker lock, fixing the
  data race caught by Sashiko AI review.

v4:
- Patch 1/4: new patch, skipping objects for which xe_bo_shrink()
  returns -EBUSY rather than aborting the shrinker walk. (Sashiko)

v5:
- Patch 3/4: make the non-purgeable shrinker seeks value tunable
  through Kconfig and sysfs. (Matthew Brost)

Thomas Hellström (4):
  drm/xe: Don't abort the shrinker walk on -EBUSY
  drm/xe: Track number of populated ttm_tts in the shrinker
  drm/xe: Split the bo shrinker into purgeable and non-purgeable
    shrinkers
  drm/xe: Update non-purgeable shrinker batch size based on average BO
    size

 drivers/gpu/drm/xe/Kconfig.profile   |  12 ++
 drivers/gpu/drm/xe/xe_bo.c           |  12 +-
 drivers/gpu/drm/xe/xe_device_sysfs.c |  50 +++++++
 drivers/gpu/drm/xe/xe_shrinker.c     | 213 ++++++++++++++++++++-------
 drivers/gpu/drm/xe/xe_shrinker.h     |   7 +-
 5 files changed, 236 insertions(+), 58 deletions(-)

-- 
2.56.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-10-19 21:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-19  9:56 [PATCH v5 0/4] drm/xe: Split the bo shrinker and adjust batch size Thomas Hellström
2026-10-19  9:56 ` [PATCH v5 1/4] drm/xe: Don't abort the shrinker walk on -EBUSY Thomas Hellström
2026-10-19 10:12   ` sashiko-bot
2026-10-19  9:56 ` [PATCH v5 2/4] drm/xe: Track number of populated ttm_tts in the shrinker Thomas Hellström
2026-10-19  9:56 ` [PATCH v5 3/4] drm/xe: Split the bo shrinker into purgeable and non-purgeable shrinkers Thomas Hellström
2026-10-19 21:47   ` Matthew Brost
2026-10-19  9:56 ` [PATCH v5 4/4] drm/xe: Update non-purgeable shrinker batch size based on average BO size Thomas Hellström
2026-10-19 10:17 ` ✓ CI.KUnit: success for drm/xe: Split the bo shrinker and adjust batch size Patchwork
2026-10-19 10:33 ` ✗ CI.checksparse: warning " Patchwork
2026-10-19 10:57 ` ✓ Xe.CI.BAT: success " Patchwork
2026-10-19 12:50 ` ✓ Xe.CI.FULL: " Patchwork

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.