OSDN Git Service

drm/ttm: Reduce the number of used allocation orders for TTM pages
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Tue, 4 Apr 2023 20:06:49 +0000 (22:06 +0200)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Thu, 6 Apr 2023 08:00:21 +0000 (10:00 +0200)
commit322458c2bb1a0398c5775333e1e71e1ece8a461f
tree1019294aca92bc89560d1ac01dccf36fec5efd55
parent379989e7cbdc7aa7496a00ee286ec146c7599cf0
drm/ttm: Reduce the number of used allocation orders for TTM pages

When swapping out, we will split multi-order pages both in order to
move them to the swap-cache and to be able to return memory to the
swap cache as soon as possible on a page-by-page basis.
Reduce the page max order to the system PMD size, as we can then be nicer
to the system and avoid splitting gigantic pages.

Looking forward to when we might be able to swap out PMD size folios
without splitting, this will also be a benefit.

v2:
- Include all orders up to the PMD size (Christian König)
v3:
- Avoid compilation errors for architectures with special PFN_SHIFTs

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230404200650.11043-3-thomas.hellstrom@linux.intel.com
drivers/gpu/drm/ttm/ttm_pool.c