From: Boris Brezillon <boris.brezillon@collabora.com>
To: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Cc: 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>,
Steven Price <steven.price@arm.com>,
Liviu Dudau <liviu.dudau@arm.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
kernel@collabora.com
Subject: Re: [PATCH 2/2] drm/panthor: Implement evicted status for GEM objects
Date: Tue, 21 Apr 2026 09:22:07 +0200 [thread overview]
Message-ID: <20260421092207.07bc1f6c@fedora> (raw)
In-Reply-To: <ArK2sKSOQ3qNB7BnrfkXew@collabora.com>
On Mon, 20 Apr 2026 19:46:52 +0200
Nicolas Frattaroli <nicolas.frattaroli@collabora.com> wrote:
> > > +
> > > panthor_gem_dev_map_cleanup_locked(bo);
> > > panthor_gem_backing_cleanup_locked(bo);
> > > panthor_gem_update_reclaim_state_locked(bo, NULL);
> > > @@ -788,6 +792,8 @@ static enum drm_gem_object_status panthor_gem_status(struct drm_gem_object *obj)
> > >
> > > if (drm_gem_is_imported(&bo->base) || bo->backing.pages)
> > > res |= DRM_GEM_OBJECT_RESIDENT;
> > > + else if (atomic_read(&bo->reclaimed_count))
> > > + res |= DRM_GEM_OBJECT_EVICTED;
> > >
> > > return res;
> > > }
> > > @@ -1595,6 +1601,7 @@ static void panthor_gem_debugfs_print_flag_names(struct seq_file *m)
> > > static const char * const gem_state_flags_names[] = {
> > > [PANTHOR_DEBUGFS_GEM_STATE_IMPORTED_BIT] = "imported",
> > > [PANTHOR_DEBUGFS_GEM_STATE_EXPORTED_BIT] = "exported",
> > > + [PANTHOR_DEBUGFS_GEM_STATE_EVICTED_BIT] = "evicted",
> > > };
> > >
> > > static const char * const gem_usage_flags_names[] = {
> > > @@ -1648,6 +1655,9 @@ static void panthor_gem_debugfs_bo_print(struct panthor_gem_object *bo,
> > >
> > > if (drm_gem_is_imported(&bo->base))
> > > gem_state_flags |= PANTHOR_DEBUGFS_GEM_STATE_FLAG_IMPORTED;
> > > + else if (!resident_size && atomic_read(&bo->reclaimed_count))
> > > + gem_state_flags |= PANTHOR_DEBUGFS_GEM_STATE_FLAG_EVICTED;
> >
> > I think it'd be interesting to know the number of times a BO got
> > evicted.
>
> Agreed. Should I add that as a separate column?
Yes
> I think I'll keep the
> state flag even if I add a column, because even if it's technically
> redundant, it'll still be useful to see without having to compare
> three different columns.
Sure, keeping the "evicted" flag is fine.
prev parent reply other threads:[~2026-04-21 7:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-20 15:46 [PATCH 0/2] Let userspace know about swapped out panthor GEM objects Nicolas Frattaroli
2026-04-20 15:46 ` [PATCH 1/2] drm/fdinfo: Add "evicted" memory accounting Nicolas Frattaroli
2026-04-20 15:47 ` [PATCH 2/2] drm/panthor: Implement evicted status for GEM objects Nicolas Frattaroli
2026-04-20 16:17 ` Boris Brezillon
2026-04-20 17:46 ` Nicolas Frattaroli
2026-04-21 7:22 ` Boris Brezillon [this message]
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=20260421092207.07bc1f6c@fedora \
--to=boris.brezillon@collabora.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liviu.dudau@arm.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=nicolas.frattaroli@collabora.com \
--cc=simona@ffwll.ch \
--cc=steven.price@arm.com \
--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 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.