From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796208868; b=SdjR3p3rVi3ijzIxsMscTGwv9vs03yCg6j0NV/U2rxoPMm9mLyCjqgl4hwnJvmgK1Nac FtJ/OTol87R7EQfRW8WdaqDZ7I84e218FTtA15PG/RUqEvs5U9277u49B2/E4S8W50v/n 4kIzrw8zEAk/sfHSSprjJnPqUam8JwuYuoE67heu40pvyqJIbdGsZLZO2c2N+jLD+8Qvd 8yeiKzBOU0YnfGPsIsZBUQ/14SabMC6BcOYjkHOoL0wusfVCOuapaGQV53iaLkKGWeO/3 B/SAQJTcxssCNL9c+BZRmFsaiP/oP4PRJipHKoF/T+WVXlhytPenPhvVrvN+pyrhfXg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796208868; h=Received:DKIM-Signature:Subject:To:Cc:From:Date:Message-ID: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=j84yCXtVfngSGeNBFPdgHWlad4tUm4Ell97IMmYH+9g=; b=DvsvcPOD0Dxekd0aN0C5px356jxLSM6/jkI7hXWUf9pgW6BC99A/IGie6PZhBelVceij iWSgnfyck9b4zrgGhVyaeXo8+UqNDfl/jVXPa8LoAjDKiJ3/7g63vjFXLGt3PR2rjk1DS nSFudMsuQxjAkp6hIQJ2ctjmFo/GPaIk7Nvj9KYCxc8UNyRAKnUlTtE/JFISn6xfNdFSF nJjas+GotWC7hWpsQO6e4khUqdvqCpe7GipbhNQQKg3jk7HHQD4O3urmyzFZBjFbyOUKw 8YHfKqWa06+zLzh7VD2ShHYp4RCsItui9FmzVS/7phhg1PvThlvlBHT3t9na4bQHUWw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=apQAgb1w; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D723606A322 for ; Wed, 2 Dec 2026 10:54:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=apQAgb1w Received: by smtp.kernel.org (Postfix) with ESMTPSA id CDD731F008A0; Wed, 2 Dec 2026 10:54:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796208867; bh=j84yCXtVfngSGeNBFPdgHWlad4tUm4Ell97IMmYH+9g=; h=Subject:To:Cc:From:Date; b=apQAgb1wUsowqqveEvtK18lquvHkXCPVZ2Ln24+8XT0XpacsSxRWh2braagxMY7ZY Wet4Hw3XCIm/Vd7gqku3Tqc8lcr3EpR9cW79+4/js29Nr9RHvJoS2aqEwB0eGSxP2B gGtoOqsRkEhDUrSEM51dhrAfQW+5Ul7ILp/Wozzc= Subject: FAILED: patch "[PATCH] drm/xe: Don't abort the shrinker walk on -EBUSY" failed to apply to 6.18-stable tree To: thomas.hellstrom@linux.intel.com,airlied@redhat.com,christian.koenig@amd.com,matthew.brost@intel.com,rodrigo.vivi@intel.com,stable@vger.kernel.org Cc: From: Date: Wed, 02 Dec 2026 11:54:24 +0100 Message-ID: <2026120224-clinking-mayday-f935@gregkh> X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.18-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.18.y git checkout FETCH_HEAD git cherry-pick -x 9de430b6fbbdfeee1a5eec33edf53f52c13c869b # git commit -s git send-email --to '' --in-reply-to '2026120224-clinking-mayday-f935@gregkh' --subject-prefix 'PATCH 6.18.y' 'HEAD^..' Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 9de430b6fbbdfeee1a5eec33edf53f52c13c869b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= Date: Mon, 19 Oct 2026 11:56:52 +0200 Subject: [PATCH] drm/xe: Don't abort the shrinker walk on -EBUSY MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit xe_bo_shrink() returns -EBUSY for bos that can't currently be shrunk, for example imported dma-bufs, bos whose vm is currently validating, bos that are still busy after the wait timeout, or bos whose backup fails. The shrinker LRU walk treats any negative return value as fatal and aborts, which also skips the remaining shrinker passes. As a result, a single such bo, like an imported dma-buf on the XE_PL_TT LRU, prevents reclaim of all bos behind it on the LRU. Skip bos for which xe_bo_shrink() returns -EBUSY and continue the walk, like the TTM LRU walk does. v4: - Patch introduced. Fixes: 00c8efc3180f ("drm/xe: Add a shrinker for xe bos") Cc: Christian König Cc: Matthew Brost Cc: Rodrigo Vivi Cc: intel-xe@lists.freedesktop.org Cc: # v6.15+ Assisted-by: LLM Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Link: https://patch.msgid.link/20261019095655.3501-2-thomas.hellstrom@linux.intel.com (cherry picked from commit 846f333b3e0b48065f96bee74ffa0b9d390ed05f) Signed-off-by: Matthew Brost Signed-off-by: Dave Airlie diff --git a/drivers/gpu/drm/xe/xe_shrinker.c b/drivers/gpu/drm/xe/xe_shrinker.c index deb4378c1ec1..4e4da76936f4 100644 --- a/drivers/gpu/drm/xe/xe_shrinker.c +++ b/drivers/gpu/drm/xe/xe_shrinker.c @@ -113,6 +113,9 @@ static int __xe_shrinker_walk(struct xe_shrinker *shrinker, continue; lret = xe_bo_shrink(ctx, ttm_bo, flags, scanned); + /* Like the TTM LRU walk, skip bos we can't shrink now. */ + if (lret == -EBUSY) + continue; if (lret < 0) { ret = lret; goto out;