Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4836753pxj; Wed, 9 Jun 2021 03:08:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6s/pIrYy0Tf5HYSknTKmKIN+YXJshI16RSgRHPmPpI0jlK2lJGKAJYGFTQ5riLz3P9TWJ X-Received: by 2002:a17:906:26ce:: with SMTP id u14mr27236259ejc.187.1623233293625; Wed, 09 Jun 2021 03:08:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623233293; cv=none; d=google.com; s=arc-20160816; b=HJ9Enpyw5QBHyMj0bVBTgD9JC4OIK/UEAqfwPSF1weN24eZeoM6f5q+LYIlBDECPul bTdWrUqM7SuOoVjVRsWLb5/x0wg2g7jrsWCbzQJ3Pb6CK/WJjsnvBjHO91ZVqUUeLKsI mpGCZsia5rdMvsjqyTAJyKKM4Hduwnuw3BlMa209H6fHmE/7noA5D9kiCosFQFH3P60y JY5qh2IwrUIo9FGt6aR2VrK8Omad59gLf9ZdSX5cZ4h1pHGiRCoA9v42nvzvWLkyOV5z hBuPs5sIy1atv8DfLDUCHPYyXPUPzzf1Kenq6RM2YyqKjJEycJVKEwISfAtntoXVYBfF GR9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BmKgDPMkOIhMbyctoMfvzB+5V81637VGMfYaMspBb2o=; b=mumEhCRA01HtTktlc1jtZKAV0Wo61z6UD0sHEZ7MFlFKLJkHM0p4v5GYhCewc1CC1k Isij9ppzJmFjogFPNGeKVHVlHlsq4rF5psejkywLzUNM4NPSWZ6/juZA548WxWpGaBgc v/4PJZSxf6FSQONqqt6GDp2GmBaWX4aFFvDfgMUVlhBR6BWPf/fCznjsHLi1peoo8d48 yU0cW2EkhOjEJHD0urNev29g5HHujhG99Nj/w8FrLZ4IBUdOnoCvtFKka0ZAJr/viBmZ IePyh1MUc1ZhwsySy1zT6tDZ2NlTxRciT9RxA2uaTzy9hBCnx6fvMKipwDakR/fXal6N VekA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RK9t+NVc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mp6si1972727ejc.146.2021.06.09.03.07.49; Wed, 09 Jun 2021 03:08:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RK9t+NVc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235538AbhFHSvM (ORCPT + 99 others); Tue, 8 Jun 2021 14:51:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:43766 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236035AbhFHSqL (ORCPT ); Tue, 8 Jun 2021 14:46:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 00BD561449; Tue, 8 Jun 2021 18:37:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623177450; bh=s0YyBVXtSIcGth2gdcY+Bu3GJBOB093AGJ/x5nJAp+E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RK9t+NVcOh5Hhu8uLD+81y7ohiSgIELby9CAYwqBVPZxM1iWV4tpxZQM5V5cW81d5 WXWMSdBNc/T2qlTqR9bjmAeXcbRmqEhIrGblCqczGw1MV+lxw1+m4kiIewnt6l7rge F4L2UbFGsI69NCNXOYMiZbknsAeCcgb0wyjlZxHo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexander Deucher , Luben Tuikov , =?UTF-8?q?Christian=20K=C3=B6nig?= , Alex Deucher Subject: [PATCH 5.4 56/78] drm/amdgpu: Dont query CE and UE errors Date: Tue, 8 Jun 2021 20:27:25 +0200 Message-Id: <20210608175937.169766702@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210608175935.254388043@linuxfoundation.org> References: <20210608175935.254388043@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Luben Tuikov commit dce3d8e1d070900e0feeb06787a319ff9379212c upstream. On QUERY2 IOCTL don't query counts of correctable and uncorrectable errors, since when RAS is enabled and supported on Vega20 server boards, this takes insurmountably long time, in O(n^3), which slows the system down to the point of it being unusable when we have GUI up. Fixes: ae363a212b14 ("drm/amdgpu: Add a new flag to AMDGPU_CTX_OP_QUERY_STATE2") Cc: Alexander Deucher Cc: stable@vger.kernel.org Signed-off-by: Luben Tuikov Reviewed-by: Alexander Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 16 ---------------- 1 file changed, 16 deletions(-) --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c @@ -351,7 +351,6 @@ static int amdgpu_ctx_query2(struct amdg { struct amdgpu_ctx *ctx; struct amdgpu_ctx_mgr *mgr; - unsigned long ras_counter; if (!fpriv) return -EINVAL; @@ -376,21 +375,6 @@ static int amdgpu_ctx_query2(struct amdg if (atomic_read(&ctx->guilty)) out->state.flags |= AMDGPU_CTX_QUERY2_FLAGS_GUILTY; - /*query ue count*/ - ras_counter = amdgpu_ras_query_error_count(adev, false); - /*ras counter is monotonic increasing*/ - if (ras_counter != ctx->ras_counter_ue) { - out->state.flags |= AMDGPU_CTX_QUERY2_FLAGS_RAS_UE; - ctx->ras_counter_ue = ras_counter; - } - - /*query ce count*/ - ras_counter = amdgpu_ras_query_error_count(adev, true); - if (ras_counter != ctx->ras_counter_ce) { - out->state.flags |= AMDGPU_CTX_QUERY2_FLAGS_RAS_CE; - ctx->ras_counter_ce = ras_counter; - } - mutex_unlock(&mgr->lock); return 0; }