On 30.06.25 06:49, Dave Airlie wrote:
> From: Dave Airlie <[email protected]>
> 
> The list_lru will now handle numa for us, so need to keep
> separate pool types for it. Just consoldiate into the global ones.
> 
> This adds a debugfs change to avoid dumping non-existant orders due
> to this change.
> 
> Cc: Christian Koenig <[email protected]>
> Cc: Johannes Weiner <[email protected]>
> Signed-off-by: Dave Airlie <[email protected]>
> ---
>  drivers/gpu/drm/ttm/ttm_pool.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c
> index 4372f0cc4a57..95bbbc843b97 100644
> --- a/drivers/gpu/drm/ttm/ttm_pool.c
> +++ b/drivers/gpu/drm/ttm/ttm_pool.c
> @@ -399,17 +399,11 @@ static struct ttm_pool_type 
> *ttm_pool_select_type(struct ttm_pool *pool,
>  #ifdef CONFIG_X86
>       switch (caching) {
>       case ttm_write_combined:
> -             if (pool->nid != NUMA_NO_NODE)
> -                     return &pool->caching[caching].orders[order];
> -
>               if (pool->use_dma32)
>                       return &global_dma32_write_combined[order];
>  
>               return &global_write_combined[order];
>       case ttm_uncached:
> -             if (pool->nid != NUMA_NO_NODE)
> -                     return &pool->caching[caching].orders[order];
> -
>               if (pool->use_dma32)
>                       return &global_dma32_uncached[order];
>  
> @@ -1295,6 +1289,8 @@ int ttm_pool_debugfs(struct ttm_pool *pool, struct 
> seq_file *m)
>       for (i = 0; i < TTM_NUM_CACHING_TYPES; ++i) {
>               if (!ttm_pool_select_type(pool, i, 0))
>                       continue;

> +             if (pool->caching[i].orders[0].pool != pool)
> +                     continue;

That here makes no sense any more. The NUMA aware allocation goes into the 
global LRU now, so we can completely drop the debugfs for this.

In other words drop parts of the "if (!pool->use_dma_alloc && pool->nid == 
NUMA_NO_NODE) {" check above instead.

Regards,
Christian.

>               if (pool->use_dma_alloc)
>                       seq_puts(m, "DMA ");
>               else

Reply via email to