From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F3230C7EE2A for ; Mon, 30 Jun 2025 04:51:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5846710E1B4; Mon, 30 Jun 2025 04:51:04 +0000 (UTC) Received: from us-smtp-delivery-44.mimecast.com (us-smtp-delivery-44.mimecast.com [205.139.111.44]) by gabe.freedesktop.org (Postfix) with ESMTPS id 61F6B10E1B4 for ; Mon, 30 Jun 2025 04:51:03 +0000 (UTC) Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-602-iZFFzm70OJ-FYw_LztJnaw-1; Mon, 30 Jun 2025 00:51:00 -0400 X-MC-Unique: iZFFzm70OJ-FYw_LztJnaw-1 X-Mimecast-MFC-AGG-ID: iZFFzm70OJ-FYw_LztJnaw_1751259059 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E7D1E195608C; Mon, 30 Jun 2025 04:50:58 +0000 (UTC) Received: from dreadlord.redhat.com (unknown [10.67.24.96]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B23751956095; Mon, 30 Jun 2025 04:50:53 +0000 (UTC) From: Dave Airlie To: dri-devel@lists.freedesktop.org, linux-mm@kvack.org, Johannes Weiner , Christian Koenig Cc: Dave Chinner , Kairui Song , Dave Airlie Subject: [PATCH 05/17] ttm/pool: drop numa specific pools Date: Mon, 30 Jun 2025 14:49:24 +1000 Message-ID: <20250630045005.1337339-6-airlied@gmail.com> In-Reply-To: <20250630045005.1337339-1-airlied@gmail.com> References: <20250630045005.1337339-1-airlied@gmail.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: EP9MeKaU69S78iA0RmSrbL8F5z7a_iJOh60wyH6nVCA_1751259059 X-Mimecast-Originator: gmail.com Content-Transfer-Encoding: quoted-printable content-type: text/plain; charset=WINDOWS-1252; x-default=true X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Dave Airlie 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 Cc: Johannes Weiner Signed-off-by: Dave Airlie --- 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(str= uct ttm_pool *pool, #ifdef CONFIG_X86 =09switch (caching) { =09case ttm_write_combined: -=09=09if (pool->nid !=3D NUMA_NO_NODE) -=09=09=09return &pool->caching[caching].orders[order]; - =09=09if (pool->use_dma32) =09=09=09return &global_dma32_write_combined[order]; =20 =09=09return &global_write_combined[order]; =09case ttm_uncached: -=09=09if (pool->nid !=3D NUMA_NO_NODE) -=09=09=09return &pool->caching[caching].orders[order]; - =09=09if (pool->use_dma32) =09=09=09return &global_dma32_uncached[order]; =20 @@ -1295,6 +1289,8 @@ int ttm_pool_debugfs(struct ttm_pool *pool, struct se= q_file *m) =09for (i =3D 0; i < TTM_NUM_CACHING_TYPES; ++i) { =09=09if (!ttm_pool_select_type(pool, i, 0)) =09=09=09continue; +=09=09if (pool->caching[i].orders[0].pool !=3D pool) +=09=09=09continue; =09=09if (pool->use_dma_alloc) =09=09=09seq_puts(m, "DMA "); =09=09else --=20 2.49.0