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 0F876CD13DA for ; Thu, 30 Apr 2026 19:18:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F145610F426; Thu, 30 Apr 2026 19:18:16 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="QXue9Wwx"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id B5CA810E165; Thu, 30 Apr 2026 19:18:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1777576696; x=1809112696; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/LNOjKC/kiZY6JfD2RWITRAyQVTUPMBtoPL7IFtUdHQ=; b=QXue9Wwxpzni42cZJnP0wgmnJ0i1zHccqWfo7VEY2DLITIw4p31yLQ7d Xk6fOJmUOjhMZ4S/aQzoFyrwETkqRdMDEL/UIRInqOlwc3RSa4ngYngdM QgN0O9Gx/HsTxEJKXFqm6dNpCjbIYY++w4ThabSMjtf9huuPVbWkLCp6M kAX3pL27zFadRipqyAU8B/l/7V365b7RiR5Tr5ASQBrT4plzNQXFwG4/H ZnbmlMSRZIL8AX9Hmv4Ykrhh/RjAJqpzx6lTeiwaRYnOzJzShslyX1kma 8ulfYkU5Qwv4zFdNt77A8bTL1DeLUyr1TREtZ+QkQISiREIUX7DKUF2gj w==; X-CSE-ConnectionGUID: JM5ZQ75eTQCHcTQlHDuaBw== X-CSE-MsgGUID: kyBM7ZVkSKWz4Ad9XEezjw== X-IronPort-AV: E=McAfee;i="6800,10657,11772"; a="77706763" X-IronPort-AV: E=Sophos;i="6.23,208,1770624000"; d="scan'208";a="77706763" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Apr 2026 12:18:15 -0700 X-CSE-ConnectionGUID: mJwKRdGcTMSYe6Bw4R5msQ== X-CSE-MsgGUID: d2h9EJ4QQf+OLKbt08Fiyg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,208,1770624000"; d="scan'208";a="233801154" Received: from gsse-cloud1.jf.intel.com ([10.54.39.91]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Apr 2026 12:18:14 -0700 From: Matthew Brost To: intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= , Carlos Santa , Matthew Auld , Andi Shyti Subject: [PATCH v4 5/6] drm/xe: Set TTM device beneficial_order to 9 (2M) Date: Thu, 30 Apr 2026 12:18:08 -0700 Message-Id: <20260430191809.2142544-6-matthew.brost@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260430191809.2142544-1-matthew.brost@intel.com> References: <20260430191809.2142544-1-matthew.brost@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" 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: Thomas Hellström Cc: Carlos Santa Cc: Matthew Auld Signed-off-by: Matthew Brost Reviewed-by: Andi Shyti --- 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); -- 2.34.1