On Thu, 15 Apr 2021 13:56:24 +0200 "Christian König" <ckoenig.leichtzumerken@xxxxxxxxx> wrote:
@@ -530,6 +525,11 @@ void ttm_pool_fini(struct ttm_pool *pool)It isn't immediately clear to me how this works. ttm_pool_fini() has
for (j = 0; j < MAX_ORDER; ++j)
ttm_pool_type_fini(&pool->caching[i].orders[j]);
}
+
+ /* We removed the pool types from the LRU, but we need to also make sure
+ * that no shrinker is concurrently freeing pages from the pool.
+ */
+ sync_shrinkers();
already freed all the pages hasn't it? So why would it care if some
shrinkers are still playing with the pages?
Or is it the case that ttm_pool_fini() is assuming that there will be
some further action against these pages, which requires that shrinkers
no longer be accessing the pages and which further assumes that future
shrinker invocations will not be able to look up these pages?
IOW, a bit more explanation about the dynamics here would help!