Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25F36606A697 for ; Thu, 3 Dec 2026 09:17:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=CRZ/pJU3 Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DC15F10E0FE; Thu, 3 Dec 2026 09:17:21 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3DE4610E0FE; Thu, 3 Dec 2026 09:17:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796289437; x=1827825437; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=80Z0v6TWsNk8hnO0E9p9tl3fJXVdqGqRAYq5fAKRWUc=; b=CRZ/pJU3Ocl/E25Z7Ic1sqSkRyABFVN/WYIctdSpAanbs4Lx90mUBjpM YGl73UD37YbWoHaapAui2cYELlE8KZZ7azdMJl9Mm/sttupqNI15Etu+2 ZQ7ltAx26OwAjgw3xFKZW8hwQHedimmnLTwsn0Ea3h2C5JVNFPWwQo46y 8g1QjNnwAs+wW+E2dvJNXYOcP/bxGiHEMSnIz4srZZjp/GRa3BIQfFvls x+ChZwB2xwywjAdtQ8uhQ6Hxdi/yU0k5XEBR4vZqSiIyvtpKmOoFM9ZiV SunlQCz9UoAs3DoScBp2V6guu5huEZVqCpAoN4ldxraKZn5Bj+fMWAi6J w==; X-CSE-ConnectionGUID: 8+bVKKy9TmeRybDTKUYhJQ== X-CSE-MsgGUID: 7nvSsabVTqyTfEgPRrY3MQ== X-IronPort-AV: E=McAfee;i="6800,10657,11984"; a="5257267" X-IronPort-AV: E=Sophos;i="6.27,248,1787036400"; d="scan'208";a="5257267" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 01:17:16 -0800 X-CSE-ConnectionGUID: Bg0GL7gWTnG86SBPECidYQ== X-CSE-MsgGUID: 5qgOGcvJQ4+pzzJK3jZTwQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,248,1787036400"; d="scan'208";a="14318163" Received: from alekseim-mobl.ger.corp.intel.com (HELO [10.245.244.94]) ([10.245.244.94]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 01:17:15 -0800 Message-ID: <081e7ea8-bc3c-4100-884b-17e54c0088bf@intel.com> Date: Thu, 3 Dec 2026 09:17:12 +0000 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 34/36] drm/xe: Grow the USM batch pool to 2M and map it via a single PDE To: Matthew Brost , intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: Natalie Vock , Arun Pravin References: <20261202233323.3743190-1-matthew.brost@intel.com> <20261202233323.3743190-35-matthew.brost@intel.com> Content-Language: en-GB From: Matthew Auld In-Reply-To: <20261202233323.3743190-35-matthew.brost@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Intel-xe" X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On 02/12/2026 23:33, Matthew Brost wrote: > The defrag copy path submits its migration batches from the USM batch > pool. When the pool is small, xe_bb_new() backs up in the suballocator > waiting for prior migrate batches to retire, and that stall happens while > the BO reservation lock is held during the move. Traces of a 32MB defrag > move showed the entire ~37ms lock hold sitting inside xe_migrate_copy_*() > at xe_bb_new(), i.e. pool backpressure rather than actual copy time. > > Grow the USM batch pool from 512K (integrated) / 1M (DGFX) to a uniform > 2M to give the migrate engine enough in-flight batch space to avoid this > backpressure. > > On integrated (non-DGFX) the pool is mapped into the migrate VM through > the shared level-0 pagetable alongside the 1M kernel batch pool. A full > 2M needs 512 PTEs and no longer fits in that shared table's 2M window. > Instead, map the USM pool through a dedicated level-0 pagetable (reusing > an otherwise unused pt_bo page, as the vram identity map pages are only > consumed on DGFX) and point a single reserved 2M PDE at it, mirroring the > large_page_copy reservation. DGFX is unaffected as it reaches the pool > through the vram identity map. > > Cc: Natalie Vock > Cc: Arun Pravin > Signed-off-by: Matthew Brost Reviewed-by: Matthew Auld