[PATCH v2] drm/panfrost: Print RSS for tiler heap BO's in debugfs GEMS file

Adrián Larumbe posted 1 patch 1 month, 4 weeks ago
drivers/gpu/drm/panfrost/panfrost_gem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH v2] drm/panfrost: Print RSS for tiler heap BO's in debugfs GEMS file
Posted by Adrián Larumbe 1 month, 4 weeks ago
Otherwise it would display the virtual allocation size, which is often
much bigger than the RSS.

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Fixes: e48ade5e23ba ("drm/panfrost: show device-wide list of DRM GEM objects over DebugFS")
Tested-by: Christopher Healy <healych@amazon.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
---
 drivers/gpu/drm/panfrost/panfrost_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/panfrost/panfrost_gem.c b/drivers/gpu/drm/panfrost/panfrost_gem.c
index bb73f2a68a12..85d6289a6eda 100644
--- a/drivers/gpu/drm/panfrost/panfrost_gem.c
+++ b/drivers/gpu/drm/panfrost/panfrost_gem.c
@@ -432,7 +432,7 @@ static void panfrost_gem_debugfs_bo_print(struct panfrost_gem_object *bo,
 	if (!refcount)
 		return;
 
-	resident_size = bo->base.pages ? bo->base.base.size : 0;
+	resident_size = panfrost_gem_rss(&bo->base.base);
 
 	snprintf(creator_info, sizeof(creator_info),
 		 "%s/%d", bo->debugfs.creator.process_name, bo->debugfs.creator.tgid);
-- 
2.50.0

Re: [PATCH v2] drm/panfrost: Print RSS for tiler heap BO's in debugfs GEMS file
Posted by Daniel Stone 1 month, 3 weeks ago
Hi,

On Fri, 8 Aug 2025 at 02:03, Adrián Larumbe
<adrian.larumbe@collabora.com> wrote:
> Otherwise it would display the virtual allocation size, which is often
> much bigger than the RSS.

I've pushed this to drm-misc-next-fixes to land in 6.17 with the
original commit as well.

Cheers,
Daniel
Re: [PATCH v2] drm/panfrost: Print RSS for tiler heap BO's in debugfs GEMS file
Posted by Thomas Zimmermann 1 month, 3 weeks ago
Hi Daniel

Am 08.08.25 um 13:06 schrieb Daniel Stone:
> Hi,
>
> On Fri, 8 Aug 2025 at 02:03, Adrián Larumbe
> <adrian.larumbe@collabora.com> wrote:
>> Otherwise it would display the virtual allocation size, which is often
>> much bigger than the RSS.
> I've pushed this to drm-misc-next-fixes to land in 6.17 with the
> original commit as well.

I'm going to revert this commit, because of

dim: 216d6d913861 ("drm/panfrost: Print RSS for tiler heap BO's in 
debugfs GEMS file"): committer Signed-off-by missing.
dim: 216d6d913861 ("drm/panfrost: Print RSS for tiler heap BO's in 
debugfs GEMS file"): Link tag missing.
dim: WARNING: issues in commits detected, but continuing dry-run

Shall I reapply or do you want to?

Best regards
Thomas

>
> Cheers,
> Daniel

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)


Re: [PATCH v2] drm/panfrost: Print RSS for tiler heap BO's in debugfs GEMS file
Posted by Daniel Stone 1 month, 3 weeks ago
Hi Thomas,

On Mon, 11 Aug 2025 at 13:11, Thomas Zimmermann <tzimmermann@suse.de> wrote:
> Am 08.08.25 um 13:06 schrieb Daniel Stone:
> > On Fri, 8 Aug 2025 at 02:03, Adrián Larumbe
> > <adrian.larumbe@collabora.com> wrote:
> >> Otherwise it would display the virtual allocation size, which is often
> >> much bigger than the RSS.
> > I've pushed this to drm-misc-next-fixes to land in 6.17 with the
> > original commit as well.
>
> I'm going to revert this commit, because of
>
> dim: 216d6d913861 ("drm/panfrost: Print RSS for tiler heap BO's in
> debugfs GEMS file"): committer Signed-off-by missing.
> dim: 216d6d913861 ("drm/panfrost: Print RSS for tiler heap BO's in
> debugfs GEMS file"): Link tag missing.
> dim: WARNING: issues in commits detected, but continuing dry-run
>
> Shall I reapply or do you want to?

Damn, I'm sorry about that; I got too used to b4 shazam, so forgot to
dim b4-shazam instead. I'm happy to reapply.

Cheers,
Daniel