[PATCH v2 2/2] drm/ttm: Increase pool shrinker batch target
Lucas De Marchi
lucas.demarchi at intel.com
Tue Jun 3 18:26:54 UTC 2025
On Tue, Jun 03, 2025 at 03:47:20PM +0100, Tvrtko Ursulin wrote:
>>>diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c
>>>index c060c90b89c0..e671812789ea 100644
>>>--- a/drivers/gpu/drm/ttm/ttm_pool.c
>>>+++ b/drivers/gpu/drm/ttm/ttm_pool.c
>>>@@ -1265,10 +1265,16 @@ int ttm_pool_debugfs(struct ttm_pool *pool, struct seq_file *m)
>>> }
>>> EXPORT_SYMBOL(ttm_pool_debugfs);
>>>+/* Free average pool number of pages. */
>>>+#define TTM_SHRINKER_BATCH ((1 << (MAX_PAGE_ORDER / 2)) * NR_PAGE_ORDERS)
>>
>>To be honest this feels random. But I can't come up with a better idea either and it still looks better than the default as far as I can see.
>>
>>So feel free to add Reviewed-by: Christian König <christian.koenig at amd.com> to the series.
>
>Thanks!
>
>>Should I push it to drm-misc-next or do you now have commit rights?
>
>I should be able to, think I've tested it already once.
this is defined inside an ifdef so now our kunit tests are failing with:
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig
ERROR:root:../drivers/gpu/drm/ttm/ttm_pool.c: In function ‘ttm_pool_mgr_init’:
../drivers/gpu/drm/ttm/ttm_pool.c:1335:30: error: ‘TTM_SHRINKER_BATCH’ undeclared (first use in this function)
1335 | mm_shrinker->batch = TTM_SHRINKER_BATCH;
| ^~~~~~~~~~~~~~~~~~
Maybe move it to the top of the file or before the ifdef... ?
Lucas De Marchi
More information about the dri-devel
mailing list