All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@collabora.com>
To: "Adrián Larumbe" <adrian.larumbe@collabora.com>
Cc: maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch,
	robdclark@gmail.com, quic_abhinavk@quicinc.com,
	dmitry.baryshkov@linaro.org, sean@poorly.run,
	marijn.suijten@somainline.org, robh@kernel.org,
	steven.price@arm.com, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	freedreno@lists.freedesktop.org, healych@amazon.com,
	kernel@collabora.com, tvrtko.ursulin@linux.intel.com
Subject: Re: [PATCH v8 0/5]  Add fdinfo support to Panfrost
Date: Wed, 4 Oct 2023 13:06:01 +0200	[thread overview]
Message-ID: <20231004130601.60239c7f@collabora.com> (raw)
In-Reply-To: <20230929181616.2769345-1-adrian.larumbe@collabora.com>

On Fri, 29 Sep 2023 19:14:26 +0100
Adrián Larumbe <adrian.larumbe@collabora.com> wrote:

> This patch series adds fdinfo support to the Panfrost DRM driver. It will
> display a series of key:value pairs under /proc/pid/fdinfo/fd for render
> processes that open the Panfrost DRM file.
> 
> The pairs contain basic drm gpu engine and memory region information that
> can either be cat by a privileged user or accessed with IGT's gputop
> utility.
> 
> Changelog:
> 
> v1: https://lore.kernel.org/lkml/bb52b872-e41b-3894-285e-b52cfc849782@arm.com/T/
> 
> v2: https://lore.kernel.org/lkml/20230901084457.5bc1ad69@collabora.com/T/
>  - Changed the way gpu cycles and engine time are calculated, using GPU
>    registers and taking into account potential resets.
>  - Split render engine values into fragment and vertex/tiler ones.
>  - Added more fine-grained calculation of RSS size for BO's.
>  - Implemente selection of drm-memory region size units.
>  - Removed locking of shrinker's mutex in GEM obj status function.
> 
> v3: https://lore.kernel.org/lkml/20230905184533.959171-1-adrian.larumbe@collabora.com/
>  - Changed fdinfo engine names to something more descriptive.;
>  - Mentioned GPU cycle counts aren't an exact measure.
>  - Handled the case when job->priv might be NULL.
>  - Handled 32 bit overflow of cycle register.
>  - Kept fdinfo drm memory stats size unit display within 10k times the
>    previous multiplier for more accurate BO size numbers.
>  - Removed special handling of Prime imported BO RSS.
>  - Use rss_size only for heap objects.
>  - Use bo->base.madv instead of specific purgeable flag.
>  - Fixed kernel test robot warnings.
> 
> v4: https://lore.kernel.org/lkml/20230912084044.955864-1-adrian.larumbe@collabora.com/
>  - Move cycle counter get and put to panfrost_job_hw_submit and
>    panfrost_job_handle_{err,done} for more accuracy.
>  - Make sure cycle counter refs are released in reset path
>  - Drop the model param for toggling cycle counting and do
>    leave it down to the debugfs file.
>  - Don't disable cycle counter when togglint debugfs file,
>    let refcounting logic handle it instead.
>  - Remove fdinfo data nested structure definion and 'names' field
>  - When incrementing BO RSS size in GPU MMU page fault IRQ handler, assume
>    granuality of 2MiB for every successful mapping.
>  - drm-file picks an fdinfo memory object size unit that doesn't lose precision.
> 
> v5: https://lore.kernel.org/lkml/20230914223928.2374933-1-adrian.larumbe@collabora.com/
>  - Removed explicit initialisation of atomic variable for profiling mode,
>    as it's allocated with kzalloc.
>  - Pass engine utilisation structure to jobs rather than the file context, to avoid
>    future misusage of the latter.
>  - Remove double reading of cycle counter register and ktime in job deqeueue function,
>    as the scheduler will make sure these values are read over in case of requeuing.
>  - Moved putting of cycle counting refcnt into panfrost job dequeue.
>    function to avoid repetition.
> 
> v6: https://lore.kernel.org/lkml/c73ad42b-a8db-23c2-86c7-1a2939dba044@linux.intel.com/T/
>  - Fix wrong swapped-round engine time and cycle values in fdinfo
>    drm print statements.
> 
> v7: https://lore.kernel.org/lkml/20230927213133.1651169-6-adrian.larumbe@collabora.com/T/
>  - Make sure an object's actual RSS size is added to the overall fdinfo's purgeable
>    and active size tally when it's both resident and purgeable or active.
>  - Create a drm/panfrost.rst documentation file with meaning of fdinfo strings.
>  - BUILD_BUG_ON checking the engine name array size for fdinfo.
>  - Added copyright notices for Amazon in Panfrost's new debugfs files.
>  - Discarded fdinfo memory stats unit size selection patch.
> 
> v8:
>  - Style improvements and addressing nitpicks.         
> 
> Adrián Larumbe (5):
>   drm/panfrost: Add cycle count GPU register definitions
>   drm/panfrost: Add fdinfo support GPU load metrics
>   drm/panfrost: Add fdinfo support for memory stats
>   drm/drm_file: Add DRM obj's RSS reporting function for fdinfo
>   drm/panfrost: Implement generic DRM object RSS reporting function

Queued to drm-misc-next.

Thanks!

Boris

> 
>  Documentation/gpu/drm-usage-stats.rst       |  1 +
>  Documentation/gpu/panfrost.rst              | 38 +++++++++++++
>  drivers/gpu/drm/drm_file.c                  |  8 +--
>  drivers/gpu/drm/panfrost/Makefile           |  2 +
>  drivers/gpu/drm/panfrost/panfrost_debugfs.c | 21 ++++++++
>  drivers/gpu/drm/panfrost/panfrost_debugfs.h | 14 +++++
>  drivers/gpu/drm/panfrost/panfrost_devfreq.c |  8 +++
>  drivers/gpu/drm/panfrost/panfrost_devfreq.h |  3 ++
>  drivers/gpu/drm/panfrost/panfrost_device.c  |  2 +
>  drivers/gpu/drm/panfrost/panfrost_device.h  | 13 +++++
>  drivers/gpu/drm/panfrost/panfrost_drv.c     | 60 ++++++++++++++++++++-
>  drivers/gpu/drm/panfrost/panfrost_gem.c     | 30 +++++++++++
>  drivers/gpu/drm/panfrost/panfrost_gem.h     |  5 ++
>  drivers/gpu/drm/panfrost/panfrost_gpu.c     | 41 ++++++++++++++
>  drivers/gpu/drm/panfrost/panfrost_gpu.h     |  4 ++
>  drivers/gpu/drm/panfrost/panfrost_job.c     | 24 +++++++++
>  drivers/gpu/drm/panfrost/panfrost_job.h     |  5 ++
>  drivers/gpu/drm/panfrost/panfrost_mmu.c     |  1 +
>  drivers/gpu/drm/panfrost/panfrost_regs.h    |  5 ++
>  include/drm/drm_gem.h                       |  9 ++++
>  20 files changed, 290 insertions(+), 4 deletions(-)
>  create mode 100644 Documentation/gpu/panfrost.rst
>  create mode 100644 drivers/gpu/drm/panfrost/panfrost_debugfs.c
>  create mode 100644 drivers/gpu/drm/panfrost/panfrost_debugfs.h
> 
> 
> base-commit: f45acf7acf75921c0409d452f0165f51a19a74fd


WARNING: multiple messages have this Message-ID (diff)
From: Boris Brezillon <boris.brezillon@collabora.com>
To: "Adrián Larumbe" <adrian.larumbe@collabora.com>
Cc: kernel@collabora.com, tzimmermann@suse.de,
	tvrtko.ursulin@linux.intel.com, sean@poorly.run,
	quic_abhinavk@quicinc.com, mripard@kernel.org,
	steven.price@arm.com, healych@amazon.com,
	dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
	dmitry.baryshkov@linaro.org, marijn.suijten@somainline.org,
	freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8 0/5]  Add fdinfo support to Panfrost
Date: Wed, 4 Oct 2023 13:06:01 +0200	[thread overview]
Message-ID: <20231004130601.60239c7f@collabora.com> (raw)
In-Reply-To: <20230929181616.2769345-1-adrian.larumbe@collabora.com>

On Fri, 29 Sep 2023 19:14:26 +0100
Adrián Larumbe <adrian.larumbe@collabora.com> wrote:

> This patch series adds fdinfo support to the Panfrost DRM driver. It will
> display a series of key:value pairs under /proc/pid/fdinfo/fd for render
> processes that open the Panfrost DRM file.
> 
> The pairs contain basic drm gpu engine and memory region information that
> can either be cat by a privileged user or accessed with IGT's gputop
> utility.
> 
> Changelog:
> 
> v1: https://lore.kernel.org/lkml/bb52b872-e41b-3894-285e-b52cfc849782@arm.com/T/
> 
> v2: https://lore.kernel.org/lkml/20230901084457.5bc1ad69@collabora.com/T/
>  - Changed the way gpu cycles and engine time are calculated, using GPU
>    registers and taking into account potential resets.
>  - Split render engine values into fragment and vertex/tiler ones.
>  - Added more fine-grained calculation of RSS size for BO's.
>  - Implemente selection of drm-memory region size units.
>  - Removed locking of shrinker's mutex in GEM obj status function.
> 
> v3: https://lore.kernel.org/lkml/20230905184533.959171-1-adrian.larumbe@collabora.com/
>  - Changed fdinfo engine names to something more descriptive.;
>  - Mentioned GPU cycle counts aren't an exact measure.
>  - Handled the case when job->priv might be NULL.
>  - Handled 32 bit overflow of cycle register.
>  - Kept fdinfo drm memory stats size unit display within 10k times the
>    previous multiplier for more accurate BO size numbers.
>  - Removed special handling of Prime imported BO RSS.
>  - Use rss_size only for heap objects.
>  - Use bo->base.madv instead of specific purgeable flag.
>  - Fixed kernel test robot warnings.
> 
> v4: https://lore.kernel.org/lkml/20230912084044.955864-1-adrian.larumbe@collabora.com/
>  - Move cycle counter get and put to panfrost_job_hw_submit and
>    panfrost_job_handle_{err,done} for more accuracy.
>  - Make sure cycle counter refs are released in reset path
>  - Drop the model param for toggling cycle counting and do
>    leave it down to the debugfs file.
>  - Don't disable cycle counter when togglint debugfs file,
>    let refcounting logic handle it instead.
>  - Remove fdinfo data nested structure definion and 'names' field
>  - When incrementing BO RSS size in GPU MMU page fault IRQ handler, assume
>    granuality of 2MiB for every successful mapping.
>  - drm-file picks an fdinfo memory object size unit that doesn't lose precision.
> 
> v5: https://lore.kernel.org/lkml/20230914223928.2374933-1-adrian.larumbe@collabora.com/
>  - Removed explicit initialisation of atomic variable for profiling mode,
>    as it's allocated with kzalloc.
>  - Pass engine utilisation structure to jobs rather than the file context, to avoid
>    future misusage of the latter.
>  - Remove double reading of cycle counter register and ktime in job deqeueue function,
>    as the scheduler will make sure these values are read over in case of requeuing.
>  - Moved putting of cycle counting refcnt into panfrost job dequeue.
>    function to avoid repetition.
> 
> v6: https://lore.kernel.org/lkml/c73ad42b-a8db-23c2-86c7-1a2939dba044@linux.intel.com/T/
>  - Fix wrong swapped-round engine time and cycle values in fdinfo
>    drm print statements.
> 
> v7: https://lore.kernel.org/lkml/20230927213133.1651169-6-adrian.larumbe@collabora.com/T/
>  - Make sure an object's actual RSS size is added to the overall fdinfo's purgeable
>    and active size tally when it's both resident and purgeable or active.
>  - Create a drm/panfrost.rst documentation file with meaning of fdinfo strings.
>  - BUILD_BUG_ON checking the engine name array size for fdinfo.
>  - Added copyright notices for Amazon in Panfrost's new debugfs files.
>  - Discarded fdinfo memory stats unit size selection patch.
> 
> v8:
>  - Style improvements and addressing nitpicks.         
> 
> Adrián Larumbe (5):
>   drm/panfrost: Add cycle count GPU register definitions
>   drm/panfrost: Add fdinfo support GPU load metrics
>   drm/panfrost: Add fdinfo support for memory stats
>   drm/drm_file: Add DRM obj's RSS reporting function for fdinfo
>   drm/panfrost: Implement generic DRM object RSS reporting function

Queued to drm-misc-next.

Thanks!

Boris

> 
>  Documentation/gpu/drm-usage-stats.rst       |  1 +
>  Documentation/gpu/panfrost.rst              | 38 +++++++++++++
>  drivers/gpu/drm/drm_file.c                  |  8 +--
>  drivers/gpu/drm/panfrost/Makefile           |  2 +
>  drivers/gpu/drm/panfrost/panfrost_debugfs.c | 21 ++++++++
>  drivers/gpu/drm/panfrost/panfrost_debugfs.h | 14 +++++
>  drivers/gpu/drm/panfrost/panfrost_devfreq.c |  8 +++
>  drivers/gpu/drm/panfrost/panfrost_devfreq.h |  3 ++
>  drivers/gpu/drm/panfrost/panfrost_device.c  |  2 +
>  drivers/gpu/drm/panfrost/panfrost_device.h  | 13 +++++
>  drivers/gpu/drm/panfrost/panfrost_drv.c     | 60 ++++++++++++++++++++-
>  drivers/gpu/drm/panfrost/panfrost_gem.c     | 30 +++++++++++
>  drivers/gpu/drm/panfrost/panfrost_gem.h     |  5 ++
>  drivers/gpu/drm/panfrost/panfrost_gpu.c     | 41 ++++++++++++++
>  drivers/gpu/drm/panfrost/panfrost_gpu.h     |  4 ++
>  drivers/gpu/drm/panfrost/panfrost_job.c     | 24 +++++++++
>  drivers/gpu/drm/panfrost/panfrost_job.h     |  5 ++
>  drivers/gpu/drm/panfrost/panfrost_mmu.c     |  1 +
>  drivers/gpu/drm/panfrost/panfrost_regs.h    |  5 ++
>  include/drm/drm_gem.h                       |  9 ++++
>  20 files changed, 290 insertions(+), 4 deletions(-)
>  create mode 100644 Documentation/gpu/panfrost.rst
>  create mode 100644 drivers/gpu/drm/panfrost/panfrost_debugfs.c
>  create mode 100644 drivers/gpu/drm/panfrost/panfrost_debugfs.h
> 
> 
> base-commit: f45acf7acf75921c0409d452f0165f51a19a74fd


  parent reply	other threads:[~2023-10-04 11:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-29 18:14 [PATCH v8 0/5] Add fdinfo support to Panfrost Adrián Larumbe
2023-09-29 18:14 ` Adrián Larumbe
2023-09-29 18:14 ` [PATCH v8 1/5] drm/panfrost: Add cycle count GPU register definitions Adrián Larumbe
2023-09-29 18:14   ` Adrián Larumbe
2023-09-29 18:14 ` [PATCH v8 2/5] drm/panfrost: Add fdinfo support GPU load metrics Adrián Larumbe
2023-09-29 18:14   ` Adrián Larumbe
2023-10-03  2:11   ` kernel test robot
2023-10-03  2:11     ` kernel test robot
2023-09-29 18:14 ` [PATCH v8 3/5] drm/panfrost: Add fdinfo support for memory stats Adrián Larumbe
2023-09-29 18:14   ` Adrián Larumbe
2023-09-29 18:14 ` [PATCH v8 4/5] drm/drm_file: Add DRM obj's RSS reporting function for fdinfo Adrián Larumbe
2023-09-29 18:14   ` Adrián Larumbe
2023-10-03 15:41   ` Rob Clark
2023-10-03 15:41     ` Rob Clark
2023-09-29 18:14 ` [PATCH v8 5/5] drm/panfrost: Implement generic DRM object RSS reporting function Adrián Larumbe
2023-09-29 18:14   ` Adrián Larumbe
2023-10-04 11:06 ` Boris Brezillon [this message]
2023-10-04 11:06   ` [PATCH v8 0/5] Add fdinfo support to Panfrost Boris Brezillon

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=20231004130601.60239c7f@collabora.com \
    --to=boris.brezillon@collabora.com \
    --cc=adrian.larumbe@collabora.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=healych@amazon.com \
    --cc=kernel@collabora.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=marijn.suijten@somainline.org \
    --cc=mripard@kernel.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=robdclark@gmail.com \
    --cc=robh@kernel.org \
    --cc=sean@poorly.run \
    --cc=steven.price@arm.com \
    --cc=tvrtko.ursulin@linux.intel.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.