On Tue, 2026-05-05 at 20:32 -0700, Matthew Brost wrote:
> Set the TTM device beneficial_order to 9 (2M), which is the sweet
> spot for Xe when attempting reclaim on system memory BOs, as it
> matches
> the large GPU page size. This ensures reclaim is attempted at the
> most
> effective order for the driver.
> 
> Cc: Andrew Morton <[email protected]>
> Cc: Dave Chinner <[email protected]>
> Cc: Qi Zheng <[email protected]>
> Cc: Roman Gushchin <[email protected]>
> Cc: Muchun Song <[email protected]>
> Cc: David Hildenbrand <[email protected]>
> Cc: Lorenzo Stoakes <[email protected]>
> Cc: "Liam R. Howlett" <[email protected]>
> Cc: Vlastimil Babka <[email protected]>
> Cc: Mike Rapoport <[email protected]>
> Cc: Suren Baghdasaryan <[email protected]>
> Cc: Michal Hocko <[email protected]>
> Cc: Johannes Weiner <[email protected]>
> Cc: Shakeel Butt <[email protected]>
> Cc: Kairui Song <[email protected]>
> Cc: Barry Song <[email protected]>
> Cc: Axel Rasmussen <[email protected]>
> Cc: Yuanchu Xie <[email protected]>
> Cc: Wei Xu <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: Thomas Hellström <[email protected]>
> Cc: Carlos Santa <[email protected]>
> Cc: Matthew Auld <[email protected]>
> Signed-off-by: Matthew Brost <[email protected]>
> Reviewed-by: Andi Shyti <[email protected]>

Reviewed-by: Thomas Hellström <[email protected]>


> ---
>  drivers/gpu/drm/xe/xe_device.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_device.c
> b/drivers/gpu/drm/xe/xe_device.c
> index 4b45b617a039..3f719ab08d1c 100644
> --- a/drivers/gpu/drm/xe/xe_device.c
> +++ b/drivers/gpu/drm/xe/xe_device.c
> @@ -500,7 +500,8 @@ struct xe_device *xe_device_create(struct pci_dev
> *pdev,
>  
>       err = ttm_device_init(&xe->ttm, &xe_ttm_funcs, xe->drm.dev,
>                             xe->drm.anon_inode->i_mapping,
> -                           xe->drm.vma_offset_manager, 0);
> +                           xe->drm.vma_offset_manager,
> +                          
> TTM_ALLOCATION_POOL_BENEFICIAL_ORDER(get_order(SZ_2M)));
>       if (WARN_ON(err))
>               return ERR_PTR(err);
>  

Reply via email to