]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/ttm: stop pooling cached NUMA pages v2
authorChristian König <ckoenig.leichtzumerken@gmail.com>
Mon, 15 Apr 2024 13:48:21 +0000 (15:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 May 2024 14:32:41 +0000 (16:32 +0200)
commitab65b0cf0324b6dae89cfc9c7d9625e591b24e43
tree8ec1a6addc1d543a2552c6406991ac885c7d76c0
parentded1ffea52132e58eaaa7d4ea39477f911796a40
drm/ttm: stop pooling cached NUMA pages v2

[ Upstream commit b6976f323a8687cc0d55bc92c2086fd934324ed5 ]

We only pool write combined and uncached allocations because they
require extra overhead on allocation and release.

If we also pool cached NUMA it not only means some extra unnecessary
overhead, but also that under memory pressure it can happen that
pages from the wrong NUMA node enters the pool and are re-used
over and over again.

This can lead to performance reduction after running into memory
pressure.

v2: restructure and cleanup the code a bit from the internal hack to
    test this.

Signed-off-by: Christian König <christian.koenig@amd.com>
Fixes: 4482d3c94d7f ("drm/ttm: add NUMA node id to the pool")
CC: stable@vger.kernel.org
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240415134821.1919-1-christian.koenig@amd.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/ttm/ttm_pool.c