[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <42ec58fd-d570-43a0-b440-cd0983e6d1e9@arm.com>
Date: Fri, 20 Dec 2024 11:12:28 +0000
From: Steven Price <steven.price@....com>
To: Adrián Larumbe <adrian.larumbe@...labora.com>,
Boris Brezillon <boris.brezillon@...labora.com>,
Liviu Dudau <liviu.dudau@....com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>
Cc: kernel@...labora.com, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 1/2] drm/panthor: Expose size of driver internal BO's
over fdinfo
On 18/12/2024 19:14, Adrián Larumbe wrote:
> On 19.12.2024 02:18, Adrián Martínez Larumbe wrote:
>> From: Adrián Larumbe <adrian.larumbe@...labora.com>
>>
>> This will display the sizes of kenrel BO's bound to an open file, which are
>> otherwise not exposed to UM through a handle.
>>
>> The sizes recorded are as follows:
>> - Per group: suspend buffer, protm-suspend buffer, syncobjcs
>> - Per queue: ringbuffer, profiling slots, firmware interface
>> - For all heaps in all heap pools across all VM's bound to an open file,
>> record size of all heap chuks, and for each pool the gpu_context BO too.
>>
>> This does not record the size of FW regions, as these aren't bound to a
>> specific open file and remain active through the whole life of the driver.
>>
>> Signed-off-by: Adrián Larumbe <adrian.larumbe@...labora.com>
>> Reviewed-by: Liviu Dudau <liviu.dudau@....com>
>> ---
[...]
>> +size_t panthor_heap_pool_size(struct panthor_heap_pool *pool)
>> +{
>> + struct panthor_heap *heap;
>> + unsigned long i;
>> + size_t size = 0;
>> +
>> + down_read(&pool->lock);
>> + xa_for_each(&pool->xa, i, heap)
>> + size += heap->chunk_size * heap->chunk_count;
>> + up_write(&pool->lock);
>
> Oh well, just realised I forgot to change this to up_read() so will do in a final revision.
With that fixed, feel free to add:
Reviewed-by: Steven Price <steven.price@....com>
Thanks,
Steve
Powered by blists - more mailing lists