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 17F82D2AB1D for ; Tue, 29 Oct 2024 10:36:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B308610E61B; Tue, 29 Oct 2024 10:36:26 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="YvfR1dc5"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 56C1B10E616 for ; Tue, 29 Oct 2024 10:36:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730198185; x=1761734185; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TfYlddEc+mTaAbptWrPgXIGlpXBF4yyNfdMmgVGflyo=; b=YvfR1dc5I0aePsa9dLa8K9yjCVXHuGo2zSt/S2l+fIkzscNiDsHeEHrW JAE/vWk0CzFR6XqRxdDObXvBuJxFMwwOToSUdo5o3kQxrI6IMalw1l8HL UbyJAsB8BZkgwIEFBGHiL69rg0bqbAUogT0uS0Msiukq/+/29XL+BbqzJ Ws/gmVTQnWHcPAooYSePoAbjoS0ElDSVOnUrNOBOP0r3Uues25t8Ci3sp SSi/Nz6htr+SQc5jvDQGIJH5qsp70ziGjwdp7oRmT3oBD2ZizL+IsM3W6 3fmzmWUxk7DnXWxGMNOQ8gw8c2xyehrDzMYHo8BuwfiCBomqkEuvDGiTe Q==; X-CSE-ConnectionGUID: yQg+yvJcSxyk4P5WDlRPzQ== X-CSE-MsgGUID: GGB9X/JmQsyKl3pBjHjThA== X-IronPort-AV: E=McAfee;i="6700,10204,11239"; a="29937684" X-IronPort-AV: E=Sophos;i="6.11,241,1725346800"; d="scan'208";a="29937684" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2024 03:36:25 -0700 X-CSE-ConnectionGUID: 6B/UW57CSwe2cUGYz+s1fA== X-CSE-MsgGUID: ZKZ1k5I3Q9W4nCdFgzdEIQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,241,1725346800"; d="scan'208";a="105262797" Received: from nirmoyda-desk.igk.intel.com ([10.102.138.190]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2024 03:36:23 -0700 From: Nirmoy Das To: intel-xe@lists.freedesktop.org Cc: Nirmoy Das , Badal Nilawar , Matthew Brost , Matthew Auld , John Harrison , Himal Prasad Ghimiray , Lucas De Marchi , stable@vger.kernel.org Subject: [PATCH v4 3/3] drm/xe/guc/tlb: Flush g2h worker in case of tlb timeout Date: Tue, 29 Oct 2024 10:54:16 +0100 Message-ID: <20241029095416.3919218-3-nirmoy.das@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241029095416.3919218-1-nirmoy.das@intel.com> References: <20241029095416.3919218-1-nirmoy.das@intel.com> MIME-Version: 1.0 Organization: Intel Deutschland GmbH, Registered Address: Am Campeon 10, 85579 Neubiberg, Germany, Commercial Register: Amtsgericht Muenchen HRB 186928 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" Flush the g2h worker explicitly if TLB timeout happens which is observed on LNL and that points to the recent scheduling issue with E-cores on LNL. This is similar to the recent fix: commit e51527233804 ("drm/xe/guc/ct: Flush g2h worker in case of g2h response timeout") and should be removed once there is E core scheduling fix. v2: Add platform check(Himal) v3: Remove gfx platform check as the issue related to cpu platform(John) Use the common WA macro(John) and print when the flush resolves timeout(Matt B) Cc: Badal Nilawar Cc: Matthew Brost Cc: Matthew Auld Cc: John Harrison Cc: Himal Prasad Ghimiray Cc: Lucas De Marchi Cc: # v6.11+ Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2687 Signed-off-by: Nirmoy Das --- drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c index 773de1f08db9..0bdb3ba5220a 100644 --- a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c +++ b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c @@ -81,6 +81,15 @@ static void xe_gt_tlb_fence_timeout(struct work_struct *work) if (msecs_to_jiffies(since_inval_ms) < tlb_timeout_jiffies(gt)) break; + LNL_FLUSH_WORK(>->uc.guc.ct.g2h_worker); + since_inval_ms = ktime_ms_delta(ktime_get(), + fence->invalidation_time); + if (msecs_to_jiffies(since_inval_ms) < tlb_timeout_jiffies(gt)) { + xe_gt_dbg(gt, "LNL_FLUSH_WORK resolved TLB invalidation fence timeout, seqno=%d recv=%d", + fence->seqno, gt->tlb_invalidation.seqno_recv); + break; + } + trace_xe_gt_tlb_invalidation_fence_timeout(xe, fence); xe_gt_err(gt, "TLB invalidation fence timeout, seqno=%d recv=%d", fence->seqno, gt->tlb_invalidation.seqno_recv); -- 2.46.0