From patchwork Wed May 12 17:03:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luben Tuikov X-Patchwork-Id: 437778 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11BC4C43611 for ; Wed, 12 May 2021 17:12:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ECE28613A9 for ; Wed, 12 May 2021 17:12:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344357AbhELRJQ (ORCPT ); Wed, 12 May 2021 13:09:16 -0400 Received: from mail-dm6nam12on2080.outbound.protection.outlook.com ([40.107.243.80]:21024 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239208AbhELRE3 (ORCPT ); Wed, 12 May 2021 13:04:29 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dbLMJ6E2Ps3FleaF0frYzuhXBL+TXd4ZMasVmpcOYu0V3esX5sWRkVYEuYl+7FjFhCuhugNSO7xpVGURiGy01Dpnc7WkW3GTBayJv5WKLgSm3D0yzyAW6WQKpqWhur7gkjBv0bwbGwM9jVwVGkuGlttOSePl+XwDaToX7QcOW9T3oF8Ca6Jl4cFZSkmywH3gkcRLp4AVDs9v8EqWMmipEBhoRrExEWifYVKgP38wG88JFJGKzAnInLNk5JRnjdhyxmjDpeJ9e95z7Bz1dMt3+/ZG3sNW+oh2VohSUvA6B0L+rWavIg8dM2kWX7PJL8HMmi/nNlD+nEVrLvXSd3S/aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0dzSPQfiynSyS2ROiwD8MNElSfckwjf4PrMcS1kvOek=; b=D/ElwE9dksV489Ynyb/bgdPk9MwgRABiEKUeaj3bxQeMs01AD/sVbxpeLK1rAZgjYSrCm0B2EaVogJPUDeXQ09BZ0D/WI4GW4qMMERhFGYG30gj+RMJJo/VyJi9+lG+96nRUOH2RCmFr9CJlnjv9rk6umZR3pCSRfoF6uzjGE4JGkXp5RJpTTqyGJ4XqXGiH0FeeQOwCGm0f933CfzPlhcszwi3hpytXbHS2yEAe4xLJtt3aAG7ET2RMFqgHMj7W+X1VcRMJXL3Td6UT+2lhzxwrYe3Mzy2YCdiDA37Veg/drH8kE5CvzqUnriXskFmMT7mvw78N+cTwarlLQaCKsQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0dzSPQfiynSyS2ROiwD8MNElSfckwjf4PrMcS1kvOek=; b=rK8oflPw/6zscCAqEoy/J8jA2PHMz7uVibH1bo56PXo2lZjCLPJWYbg1k7olQQSh7qGz7UIlSupbD/K+QYrsxaETLIftgKOqdz1R9g0aCQcWl4BtL7GE4D8YZ9CilvjDs+U9piy4+2M+QQI9dLweO1vv3nPcMz5XdqE+DhfTnvc= Authentication-Results: lists.freedesktop.org; dkim=none (message not signed) header.d=none; lists.freedesktop.org; dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB3957.namprd12.prod.outlook.com (2603:10b6:610:2c::17) by CH2PR12MB3717.namprd12.prod.outlook.com (2603:10b6:610:24::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.29; Wed, 12 May 2021 17:03:16 +0000 Received: from CH2PR12MB3957.namprd12.prod.outlook.com ([fe80::a5e6:2e22:512a:7d10]) by CH2PR12MB3957.namprd12.prod.outlook.com ([fe80::a5e6:2e22:512a:7d10%7]) with mapi id 15.20.4129.026; Wed, 12 May 2021 17:03:16 +0000 From: Luben Tuikov To: amd-gfx@lists.freedesktop.org Cc: Luben Tuikov , Alexander Deucher , stable@vger.kernel.org Subject: [PATCH 1/2] drm/amdgpu: Don't query CE and UE errors Date: Wed, 12 May 2021 13:03:01 -0400 Message-Id: <20210512170302.64951-1-luben.tuikov@amd.com> X-Mailer: git-send-email 2.31.1.527.g2d677e5b15 X-Originating-IP: [108.162.138.69] X-ClientProxiedBy: YT1PR01CA0051.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:2e::20) To CH2PR12MB3957.namprd12.prod.outlook.com (2603:10b6:610:2c::17) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (108.162.138.69) by YT1PR01CA0051.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:2e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.31 via Frontend Transport; Wed, 12 May 2021 17:03:16 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 495455b4-04bc-42da-1b8a-08d91567d5d7 X-MS-TrafficTypeDiagnostic: CH2PR12MB3717: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OOGD9sYkCUkRZqSXK0J6L1v7CjtDjgLZbg7ljf038LnZsbrh3OTyLqReKaKjGy9oOYX1YTO36+I+6tPf3gA4dQNhcE8LoVhx3AVvzLlCAzgtPQ9bt2h0wDwI0Wkloizm8GmoT+A/4dNp4znSPTm81FH4yWYobiwUm9AkK+9lVGCO04ehLotwa/XQdRAyV4FueAoy1amQuhC1jfWbfvRNidykurbOK9eHX1RlBW104RwKaODeaSb2WBJt0vqiLxYT2wEPDjS4qUKiUoqnyVzVxIF16qqKA36dUuYgGc/0Ne+M6Zl2zOsoDx4Wev8INwKRrvFjvlKoMwi3MH6B+d24QPxLYQgDFXfTTtKZTKweHfiiEsCsPCAFGShigbqlO60pGaECAzm17IDg0/gSQr9kFhMk3Kei5GMRtiZVihKhMDw4SAbI/8SnwfAe+LB7OtI5EnYEC8Jh1muULALrrhYLvrHh6SRXPVClYc29mOlrTgL8kAZequZhv5kge29i3RtFoR/SF43lA+Trf9k9IkUenfztbj3c/bc8DXsky1btM2jQ2IW5I97ITZolEv784ifwc9X6neW15gadJotiJ5LR7siQhjbMecIZ24vDPSY0hJNjI2UYFhxgPkNunaaC4S/7ASNiuVLKizcwvjQELa/jkgrXKr1XYwMQG88J6rjENr05l0++5s+cSunO/le+ObJm X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB3957.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(376002)(39860400002)(136003)(366004)(396003)(8936002)(4326008)(186003)(1076003)(6512007)(6486002)(55236004)(16526019)(6916009)(2616005)(8676002)(54906003)(6506007)(316002)(66946007)(66556008)(2906002)(52116002)(6666004)(478600001)(5660300002)(956004)(38350700002)(38100700002)(86362001)(83380400001)(44832011)(26005)(66476007)(36756003)(69590400013); D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8rGnBK3Z8j17lNJsJN8ni5Fp5TLJRL6KttF7QGg+88EPe6xeY9lQxxqT28T+HDb23LLU0Js5NMcTusuUWoytibZIA6aFCWT6AfkTzCkG64+rdfAyIFL5efVgq8XVXJ3+XGVgJAuWOlXlu4MxvdXGgrZhnzjl1RLr0Cr/zfl6dJybSRzGsg0OIreJfumrK4tPTHOQHqYw1+crz3OQFZR2L6b1YyAOpnr6PQ4JHSwNVTkhNvNf/CsbzcI9rDI4qvyb9FI8mcrwbdCTJz3xWkiFVQ6O76krZwiqX7a16RnLM6 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 495455b4-04bc-42da-1b8a-08d91567d5d7 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB3957.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2021 17:03:16.5393 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pYQ7PnytPWPWq7MiMausAR++Ft1AQrBA8FdpjM8JWy8SxQn9dPBu6TBWSkY4D5ut X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB3717 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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 --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 26 ++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c index 01fe60fedcbe..d481a33f4eaf 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c @@ -363,19 +363,19 @@ static int amdgpu_ctx_query2(struct amdgpu_device *adev, 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; - } + /* 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;