All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
To: Rob Clark <robdclark@gmail.com>, Tvrtko Ursulin <tursulin@igalia.com>
Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	kernel-dev@igalia.com, "Alex Deucher" <alexander.deucher@amd.com>,
	"Rob Clark" <robdclark@chromium.org>,
	"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH 1/2] Documentation/gpu: Document the situation with unqualified drm-memory-
Date: Thu, 15 Aug 2024 09:37:31 +0100	[thread overview]
Message-ID: <51bb99fd-4f50-41b0-836d-69606c50321c@igalia.com> (raw)
In-Reply-To: <CAF6AEGvbZDg4K642HJtNAhj2f8Sv9DvfU+en52gi42=ssPiNnQ@mail.gmail.com>


On 13/08/2024 19:47, Rob Clark wrote:
> On Tue, Aug 13, 2024 at 6:57 AM Tvrtko Ursulin <tursulin@igalia.com> wrote:
>>
>> From: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
>>
>> Currently it is not well defined what is drm-memory- compared to other
>> categories.
>>
>> In practice the only driver which emits these keys is amdgpu and in them
>> exposes the current resident buffer object memory (including shared).
>>
>> To prevent any confusion, document that drm-memory- is deprecated and an
>> alias for drm-resident-memory-.
>>
>> While at it also clarify that the reserved sub-string 'memory' refers to
>> the memory region component, and also clarify the intended semantics of
>> other memory categories.
>>
>> v2:
>>   * Also mark drm-memory- as deprecated.
>>   * Add some more text describing memory categories. (Alex)
>>
>> v3:
>>   * Semantics of the amdgpu drm-memory is actually as drm-resident.
>>
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
>> Cc: Alex Deucher <alexander.deucher@amd.com>
>> Cc: Christian König <christian.keonig@amd.com>
>> Cc: Rob Clark <robdclark@chromium.org>
> 
> Reviewed-by: Rob Clark <robdclark@gmail.com>

Thanks!

So this one is stand alone and could be pushed to drm-misc-next.

2/2 can wait for AMD to give a verdict.

Regards,

Tvrtko

> 
>> ---
>>   Documentation/gpu/drm-usage-stats.rst | 25 ++++++++++++++++++++++---
>>   1 file changed, 22 insertions(+), 3 deletions(-)
>>
>> diff --git a/Documentation/gpu/drm-usage-stats.rst b/Documentation/gpu/drm-usage-stats.rst
>> index a80f95ca1b2f..ff964c707754 100644
>> --- a/Documentation/gpu/drm-usage-stats.rst
>> +++ b/Documentation/gpu/drm-usage-stats.rst
>> @@ -144,7 +144,9 @@ Memory
>>
>>   Each possible memory type which can be used to store buffer objects by the
>>   GPU in question shall be given a stable and unique name to be returned as the
>> -string here.  The name "memory" is reserved to refer to normal system memory.
>> +string here.
>> +
>> +The region name "memory" is reserved to refer to normal system memory.
>>
>>   Value shall reflect the amount of storage currently consumed by the buffer
>>   objects belong to this client, in the respective memory region.
>> @@ -152,6 +154,9 @@ objects belong to this client, in the respective memory region.
>>   Default unit shall be bytes with optional unit specifiers of 'KiB' or 'MiB'
>>   indicating kibi- or mebi-bytes.
>>
>> +This key is deprecated and is an alias for drm-resident-<region>. Only one of
>> +the two should be present in the output.
>> +
>>   - drm-shared-<region>: <uint> [KiB|MiB]
>>
>>   The total size of buffers that are shared with another file (e.g., have more
>> @@ -159,20 +164,34 @@ than a single handle).
>>
>>   - drm-total-<region>: <uint> [KiB|MiB]
>>
>> -The total size of buffers that including shared and private memory.
>> +The total size of all created buffers including shared and private memory. The
>> +backing store for the buffers does not have to be currently instantiated to be
>> +counted under this category.
>>
>>   - drm-resident-<region>: <uint> [KiB|MiB]
>>
>> -The total size of buffers that are resident in the specified region.
>> +The total size of buffers that are resident (have their backing store present or
>> +instantiated) in the specified region.
>> +
>> +This is an alias for drm-memory-<region> and only one of the two should be
>> +present in the output.
>>
>>   - drm-purgeable-<region>: <uint> [KiB|MiB]
>>
>>   The total size of buffers that are purgeable.
>>
>> +For example drivers which implement a form of 'madvise' like functionality can
>> +here count buffers which have instantiated backing store, but have been marked
>> +with an equivalent of MADV_DONTNEED.
>> +
>>   - drm-active-<region>: <uint> [KiB|MiB]
>>
>>   The total size of buffers that are active on one or more engines.
>>
>> +One practical example of this can be presence of unsignaled fences in an GEM
>> +buffer reservation object. Therefore the active category is a subset of
>> +resident.
>> +
>>   Implementation Details
>>   ======================
>>
>> --
>> 2.44.0
>>

  reply	other threads:[~2024-08-15 13:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-13 13:57 [PATCH 0/2] DRM fdinfo legacy drm-memory- clarification and amdgpu update Tvrtko Ursulin
2024-08-13 13:57 ` [PATCH 1/2] Documentation/gpu: Document the situation with unqualified drm-memory- Tvrtko Ursulin
2024-08-13 18:47   ` Rob Clark
2024-08-15  8:37     ` Tvrtko Ursulin [this message]
2024-08-19 14:20       ` Daniel Vetter
2024-08-21 20:47   ` Alex Deucher
2024-09-04  8:36     ` Tvrtko Ursulin
2024-09-06 18:12       ` Alex Deucher
2024-09-09  9:13         ` Tvrtko Ursulin
2024-08-13 13:57 ` [PATCH 2/2] drm/amdgpu: Use drm_print_memory_stats helper from fdinfo Tvrtko Ursulin
2024-08-21 20:43   ` Alex Deucher
2024-08-21 20:48     ` Alex Deucher
  -- strict thread matches above, loose matches on Subject: below --
2024-05-20 11:13 [PATCH 1/2] Documentation/gpu: Document the situation with unqualified drm-memory- Tvrtko Ursulin

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=51bb99fd-4f50-41b0-836d-69606c50321c@igalia.com \
    --to=tvrtko.ursulin@igalia.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel-dev@igalia.com \
    --cc=robdclark@chromium.org \
    --cc=robdclark@gmail.com \
    --cc=tursulin@igalia.com \
    /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.