Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8DFE9C54EBE for ; Mon, 16 Jan 2023 10:30:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DFC9810E331; Mon, 16 Jan 2023 10:30:30 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by gabe.freedesktop.org (Postfix) with ESMTP id 1F6CC10E331 for ; Mon, 16 Jan 2023 10:30:25 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BF85FAD7; Mon, 16 Jan 2023 02:31:06 -0800 (PST) Received: from [10.57.13.214] (unknown [10.57.13.214]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5A7443F67D; Mon, 16 Jan 2023 02:30:23 -0800 (PST) Message-ID: <5b4f73a1-60bf-7da6-e94d-fca9f6ec7c3a@arm.com> Date: Mon, 16 Jan 2023 10:30:21 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH RFC 0/4] drm/panfrost: Expose memory usage stats through fdinfo To: Boris Brezillon , Rob Herring , Tomeu Vizoso , Alyssa Rosenzweig , Robin Murphy References: <20230104130308.3467806-1-boris.brezillon@collabora.com> Content-Language: en-GB From: Steven Price In-Reply-To: <20230104130308.3467806-1-boris.brezillon@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christopher Healy , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 04/01/2023 13:03, Boris Brezillon wrote: > Hello, > > Here's an attempt at exposing some memory usage stats through fdinfo, > which recently proved useful in debugging a memory leak. Not entirely > sure the name I chose are accurate, so feel free to propose > alternatives, and let me know if you see any other mem-related stuff > that would be interesting to expose. Sorry it's taken me a while to look at this - I'm still working through the holiday backlog. The names look reasonable to me, and I gave this a quick spin and it seemed to work (the numbers reported looks reasonable). As Daniel suggested it would be good if some of the boiler plate fdinfo code could be moved to generic code (although to be fair there's not much here). Of course what we're missing is the 'engine' usage information for gputop - it's been on my todo list of a while, but I'm more than happy for you to do it for me ;) It's somewhat more tricky because of the whole 'queuing' on slots mechanism that Mali has. But we obviously shouldn't block this memory implementation on that, it can be added afterwards. Anyway, for the series as it is: Reviewed-by: Steven Price Thanks, Steve > Regards, > > Boris > > Boris Brezillon (4): > drm/panfrost: Provide a dummy show_fdinfo() implementation > drm/panfrost: Track BO resident size > drm/panfrost: Add a helper to retrieve MMU context stats > drm/panfrost: Expose some memory related stats through fdinfo > > drivers/gpu/drm/panfrost/panfrost_drv.c | 24 ++++++++++++++++- > drivers/gpu/drm/panfrost/panfrost_gem.h | 7 +++++ > .../gpu/drm/panfrost/panfrost_gem_shrinker.c | 1 + > drivers/gpu/drm/panfrost/panfrost_mmu.c | 27 +++++++++++++++++++ > drivers/gpu/drm/panfrost/panfrost_mmu.h | 10 +++++++ > 5 files changed, 68 insertions(+), 1 deletion(-) >