public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Let userspace explicitly trigger memory reclaims
@ 2026-05-06 10:45 Nicolas Frattaroli
  2026-05-06 10:45 ` [PATCH 1/4] drm/panthor: Add freed_sz parameter to reclaim_priv_bos Nicolas Frattaroli
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Nicolas Frattaroli @ 2026-05-06 10:45 UTC (permalink / raw)
  To: Boris Brezillon, Steven Price, Liviu Dudau, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Sumit Semwal, Christian König
  Cc: dri-devel, linux-kernel, linux-media, linaro-mm-sig,
	Nicolas Frattaroli

RAM is not, in fact, cheap. Especially on embedded systems with a low
amount of memory, but known and well-defined userspace, more explicit
resource management can lead to better utilisation patterns. As an
example, a resource manager process on a purpose-built device may wish
to launch, and then explicitly swap out, memory of processes that are
kept "warm", to improve perceived startup latency of individual
full-screen applications without making the kernel figure out the usage
pattern from observation alone in order to swap out the right pages.

To allow for this explicit control in the context of panthor's GPU
memory, add two new sysfs knobs. The first, mem_reclaim, runs an
explicit priv BO reclaim cycle on the TGID written to it.

The second, mem_claim, does the opposite: it swaps BOs back into active
memory.

Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
---
Nicolas Frattaroli (4):
      drm/panthor: Add freed_sz parameter to reclaim_priv_bos
      MAINTAINERS: Add sysfs ABI docs to list of panthor files
      drm/panthor: Add explicit memory reclaim sysfs knob
      drm/panthor: Add explicit memory claim sysfs knob

 Documentation/ABI/testing/sysfs-driver-panthor-mem | 34 ++++++++
 MAINTAINERS                                        |  1 +
 drivers/gpu/drm/panthor/panthor_drv.c              | 93 ++++++++++++++++++++++
 drivers/gpu/drm/panthor/panthor_gem.c              |  7 +-
 drivers/gpu/drm/panthor/panthor_gem.h              |  1 +
 drivers/gpu/drm/panthor/panthor_mmu.c              | 70 +++++++++++++++-
 drivers/gpu/drm/panthor/panthor_mmu.h              |  4 +
 7 files changed, 205 insertions(+), 5 deletions(-)
---
base-commit: 2c4b906cd135bbb44855287d0d0eff0ee0b47afe
change-id: 20260506-panthor-explicit-reclaim-3dffed028d8c

Best regards,
--  
Nicolas Frattaroli <nicolas.frattaroli@collabora.com>


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

end of thread, other threads:[~2026-05-06 15:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-06 10:45 [PATCH 0/4] Let userspace explicitly trigger memory reclaims Nicolas Frattaroli
2026-05-06 10:45 ` [PATCH 1/4] drm/panthor: Add freed_sz parameter to reclaim_priv_bos Nicolas Frattaroli
2026-05-06 15:06   ` Steven Price
2026-05-06 15:19     ` Nicolas Frattaroli
2026-05-06 10:45 ` [PATCH 2/4] MAINTAINERS: Add sysfs ABI docs to list of panthor files Nicolas Frattaroli
2026-05-06 10:45 ` [PATCH 3/4] drm/panthor: Add explicit memory reclaim sysfs knob Nicolas Frattaroli
2026-05-06 10:45 ` [PATCH 4/4] drm/panthor: Add explicit memory claim " Nicolas Frattaroli
2026-05-06 15:06 ` [PATCH 0/4] Let userspace explicitly trigger memory reclaims Steven Price
2026-05-06 15:43   ` Nicolas Frattaroli
2026-05-06 15:55     ` Steven Price

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox