Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/ttm: increase ttm pre-fault value to PMD size

ttm page fault handler ttm_bo_vm_fault_reserved() maps
TTM_BO_VM_NUM_PREFAULT more pages beforehand
due to the principle of locality.

However, on some platform the page faults are more costly, this
patch intends to increase the number of ttm pre-fault to relieve
the number of page faults.

When multiple levels of page table is supported, the new default
value would be the PMD size, similar to huge page.

Signed-off-by: Zhu Lingshan <lingshan.zhu@amd.com>
Reported-and-tested-by: Li Jingxiang <jingxiang.li@ecarxgroup.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240604084934.225738-1-lingshan.zhu@amd.com
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>

authored by

Zhu Lingshan and committed by
Christian König
0ddd2ae5 c1391205

+4
+4
include/drm/ttm/ttm_bo.h
··· 39 39 #include "ttm_device.h" 40 40 41 41 /* Default number of pre-faulted pages in the TTM fault handler */ 42 + #if CONFIG_PGTABLE_LEVELS > 2 43 + #define TTM_BO_VM_NUM_PREFAULT (1 << (PMD_SHIFT - PAGE_SHIFT)) 44 + #else 42 45 #define TTM_BO_VM_NUM_PREFAULT 16 46 + #endif 43 47 44 48 struct iosys_map; 45 49