Re: [PATCH] drm/ttm: Make pool shrinker more responsive

2025-05-16 Thread Tvrtko Ursulin
On 16/05/2025 15:03, Christian König wrote: On 5/16/25 15:41, Tvrtko Ursulin wrote: But because TTM shrinker does not currently update shrinkerctl->nr_scanned, shrinker core assumes TTM looked at full SHRINK_BATCH pages with every call, and adds and decrements that value to the counters it u

Re: [PATCH] drm/ttm: Make pool shrinker more responsive

2025-05-16 Thread Christian König
On 5/16/25 15:41, Tvrtko Ursulin wrote: >>> But because TTM shrinker does not currently update shrinkerctl->nr_scanned, >>> shrinker core assumes TTM looked at full SHRINK_BATCH pages with every >>> call, and adds and decrements that value to the counters it uses to >>> determine when to stop tr

Re: [PATCH] drm/ttm: Make pool shrinker more responsive

2025-05-16 Thread Tvrtko Ursulin
On 16/05/2025 12:46, Christian König wrote: On 5/16/25 13:21, Tvrtko Ursulin wrote: On 16/05/2025 09:23, Christian König wrote: On 5/15/25 22:57, Tvrtko Ursulin wrote: Currently the TTM pool shrinker ensures it frees at least something every time it is invoked, but it also lies to the core

Re: [PATCH] drm/ttm: Make pool shrinker more responsive

2025-05-16 Thread Christian König
On 5/16/25 13:21, Tvrtko Ursulin wrote: > > On 16/05/2025 09:23, Christian König wrote: >> On 5/15/25 22:57, Tvrtko Ursulin wrote: >>> Currently the TTM pool shrinker ensures it frees at least something every >>> time it is invoked, but it also lies to the core a bit on how hard it >>> tried. >>>

Re: [PATCH] drm/ttm: Make pool shrinker more responsive

2025-05-16 Thread Tvrtko Ursulin
On 16/05/2025 09:23, Christian König wrote: On 5/15/25 22:57, Tvrtko Ursulin wrote: Currently the TTM pool shrinker ensures it frees at least something every time it is invoked, but it also lies to the core a bit on how hard it tried. For example core will ask it to free SHRINK_BATCH pages bu

Re: [PATCH] drm/ttm: Make pool shrinker more responsive

2025-05-16 Thread Christian König
On 5/15/25 22:57, Tvrtko Ursulin wrote: > Currently the TTM pool shrinker ensures it frees at least something every > time it is invoked, but it also lies to the core a bit on how hard it > tried. > > For example core will ask it to free SHRINK_BATCH pages but the shrinker > can, due how it walks

[PATCH] drm/ttm: Make pool shrinker more responsive

2025-05-15 Thread Tvrtko Ursulin
Currently the TTM pool shrinker ensures it frees at least something every time it is invoked, but it also lies to the core a bit on how hard it tried. For example core will ask it to free SHRINK_BATCH pages but the shrinker can, due how it walks the LRU list of pools, free just a single page and s

[PATCH] drm/ttm: Make pool shrinker more responsive

2025-03-14 Thread Tvrtko Ursulin
Currently the TTM pool shrinker ensures it frees at least something every time it is invoked, but it also lies to the core a bit on how hard it tried. For example core will ask it to free SHRINK_BATCH pages but the shrinker can, due how it walks the LRU list of pools, free just a single page and s