The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* Re: [PATCH v3 1/3] drm/fdinfo: Add "evicted" memory accounting
       [not found]   ` <85d22f7e-af44-4a6e-911f-54830c91e339@ursulin.net>
@ 2026-05-08 14:21     ` Nicolas Frattaroli
  0 siblings, 0 replies; only message in thread
From: Nicolas Frattaroli @ 2026-05-08 14:21 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Boris Brezillon, Steven Price, Liviu Dudau,
	Jonathan Corbet, Shuah Khan, Tvrtko Ursulin
  Cc: dri-devel, linux-kernel, kernel, linux-doc

On Friday, 24 April 2026 18:01:10 Central European Summer Time Tvrtko Ursulin wrote:
> 
> On 23/04/2026 13:33, Nicolas Frattaroli wrote:
> > Currently, there's no way to know for certain how much GPU memory was
> > swapped out. The difference between total and resident memory would
> > include newly allocated pages, which are not resident, but also aren't
> > swapped out.
> > 
> > Add a new drm_gem_object_status so drivers can signal when an object has
> > been evicted to swap, and add a new "evicted" counter to
> > drm_memory_stats.
> > 
> > Due to how the supported_flags bitmask is determined, the "evicted"
> > count won't be printed to fdinfo if there's no swapped out pages.
> > 
> > Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
> > ---
> >   Documentation/gpu/drm-usage-stats.rst | 6 ++++++
> >   drivers/gpu/drm/drm_file.c            | 8 ++++++++
> >   include/drm/drm_file.h                | 2 ++
> >   include/drm/drm_gem.h                 | 2 ++
> >   4 files changed, 18 insertions(+)
> > 
> > diff --git a/Documentation/gpu/drm-usage-stats.rst b/Documentation/gpu/drm-usage-stats.rst
> > index 24d3012ca7a6..11570976095e 100644
> > --- a/Documentation/gpu/drm-usage-stats.rst
> > +++ b/Documentation/gpu/drm-usage-stats.rst
> > @@ -200,6 +200,12 @@ One practical example of this could be the presence of unsignaled fences in a
> >   GEM buffer reservation object. Therefore, the active category is a subset of the
> >   resident category.
> >   
> > +- drm-evicted-<region>: <uint> [KiB|MiB]
> > +
> > +The total size of buffers that have been evicted and are currently in swap
> > +space. Only present if there are buffers that are currently swapped out, and the
> > +driver implements reporting of this type of memory.
> 
> Please hold off merging this for a few days, I just noticed it and would 
> like to set aside some time next week to think about the semantics, how 
> it applies to discrete GPUs where evicted != swapped and some other 
> questions.
> 
> Regards,
> 
> Tvrtko
> 

It's been more than a few days (2 weeks, in fact), with no follow-up.
I'm getting a little grumpy because people expressing vague concerns,
and then disappearing over the hills for weeks, is an ongoing problem
in the DRM subsystem. If you want me to reword the documentation to
decouple eviction from swapping, then I can do that, but please say
so and then review the follow-up revision so that we're actually
working towards a solution and not just rolling the dice of who saw
the e-mail thread and felt like responding this time around.

Kind regards,
Nicolas Frattaroli



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-08 14:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260423-panthor-bo-reclaim-observability-v3-0-60af32164a4f@collabora.com>
     [not found] ` <20260423-panthor-bo-reclaim-observability-v3-1-60af32164a4f@collabora.com>
     [not found]   ` <85d22f7e-af44-4a6e-911f-54830c91e339@ursulin.net>
2026-05-08 14:21     ` [PATCH v3 1/3] drm/fdinfo: Add "evicted" memory accounting Nicolas Frattaroli

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