dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Boris Brezillon <boris.brezillon@collabora.com>,
	Steven Price <steven.price@arm.com>,
	Liviu Dudau <liviu.dudau@arm.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Tvrtko Ursulin <tursulin@ursulin.net>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	kernel@collabora.com, linux-doc@vger.kernel.org
Subject: Re: [PATCH v3 1/3] drm/fdinfo: Add "evicted" memory accounting
Date: Fri, 08 May 2026 16:21:29 +0200	[thread overview]
Message-ID: <AUXeYVnmTfKzaCIY1xm-CQ@collabora.com> (raw)
In-Reply-To: <85d22f7e-af44-4a6e-911f-54830c91e339@ursulin.net>

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



  reply	other threads:[~2026-05-08 14:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-23 12:33 [PATCH v3 0/3] Let userspace know about swapped out panthor GEM objects Nicolas Frattaroli
2026-04-23 12:33 ` [PATCH v3 1/3] drm/fdinfo: Add "evicted" memory accounting Nicolas Frattaroli
2026-04-24 15:19   ` Steven Price
2026-04-24 16:01   ` Tvrtko Ursulin
2026-05-08 14:21     ` Nicolas Frattaroli [this message]
2026-04-23 12:33 ` [PATCH v3 2/3] drm/panthor: Implement evicted status for GEM objects Nicolas Frattaroli
2026-04-24 15:19   ` Steven Price
2026-04-23 12:33 ` [PATCH v3 3/3] drm/panthor: Reduce padding in gems debugfs for refcount Nicolas Frattaroli
2026-04-24 15:19   ` Steven Price

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=AUXeYVnmTfKzaCIY1xm-CQ@collabora.com \
    --to=nicolas.frattaroli@collabora.com \
    --cc=airlied@gmail.com \
    --cc=boris.brezillon@collabora.com \
    --cc=corbet@lwn.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel@collabora.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liviu.dudau@arm.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=skhan@linuxfoundation.org \
    --cc=steven.price@arm.com \
    --cc=tursulin@ursulin.net \
    --cc=tzimmermann@suse.de \
    /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