Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp1689795rwp; Thu, 13 Jul 2023 15:09:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlGe1otLEJRzuTY1R4P3LhJIxHxjkDYjMxDps2fINPLkE9QNU9bVEHVR+BLXUXkCsxSRrzyL X-Received: by 2002:a05:6402:2037:b0:51d:92bf:e6b9 with SMTP id ay23-20020a056402203700b0051d92bfe6b9mr2680355edb.34.1689286172014; Thu, 13 Jul 2023 15:09:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689286172; cv=none; d=google.com; s=arc-20160816; b=iSudUA9bSoPDDfeP2LoHyyeKyM07yP5jNF36Z3YJbM2c9w1hqcTwpKN4sM3eh7kYWv gvMeqjAILcEgeFPNd9vdZ/TMx2G9OlQZG4Z2FkSibogYfE5LIMlMA4Kkn4S/5ohb4Uij 7NLYaLPJfsxbfUe2EGGWWPy3RjtexrsMJYS5R4ElbtP1By2L8yxQn4UCgoljVBI67T1k 9IpSKZTekJsVO6wLvaJH/iNVdKPlQzBRT7HocDVfjt0Xxfix3MclWcC5ugqrQ/LNed/v iSacTlRA7A55ZrlhQEBkJ7cI/c41NLkhw6/ycPtpWysOY1WACuaHbg/qJppG8SCLD4cA PjqA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=haPtXaNAbjvN1gN1Qc0VL4/srlGmwa1LiUX0uWr0Rds=; fh=aYwOFvh45AiUk04AC35/CxFbCKpYy0XHNT+Ky7LGVhk=; b=DaZrOlcocJK9CHmTGbN4HQVPcMfHwO/TCxckahDseYavctfkr/FxWye0y0pTNYkAN4 s7WdM3kIraWelo40EI5WdI4WDWmXOVxYQdVGPV9Dfs7Vom58lgXwpFE7BS8oye4J1dNf O8FBjCuZSgnfdHRpUBi+O++Keu++370B2kWkp4XDsVvuXXAb4hR5gVH3zQzI/opxRwcY fF08wrUwtm1X/Up56y3JKLgVAZAlDhBo8yQW2tAKwp6d2pGvlW+En1lCYE5Nnlvj88ya 0/WKMHPsh7u1t8rOziYuvr0zxtIo084pCZM1yT+BRJCoyi7Ewnk++d/9TRe8egZOe/fU ugRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=fhZEZ2eP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w9-20020a056402128900b0051e0fa6f696si8344255edv.434.2023.07.13.15.09.06; Thu, 13 Jul 2023 15:09:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=fhZEZ2eP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232164AbjGMVdd (ORCPT + 99 others); Thu, 13 Jul 2023 17:33:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231644AbjGMVdY (ORCPT ); Thu, 13 Jul 2023 17:33:24 -0400 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90E022D5F for ; Thu, 13 Jul 2023 14:33:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=haPtXaNAbjvN1gN1Qc0VL4/srlGmwa1LiUX0uWr0Rds=; b=fhZEZ2ePHPD4F7ZyhdzLTbQBCf rZf9p38ZMoyLzNjguHX2WxksXK87S9PdlLTBmb/09UUfMsmrJobTVCSPpRaHTUVeXOrglzEUvwiU1 felj1TAmGjwM3GSnZnYSe4Y2LmXYgUl79uIuVf2iqD39jbE1V4T9adEhJxReB7AN5R6xjpVQpMeQw 7qy8bZgfTfAbHcFGmxfsmowYhIoyeeCWUO2pt1DsDpNtfFTJHGJZePWyyGJPVxcr1h/MaWUxxT4MP uy+YJu/infhFCmMdKL2Pn3ibV1KPnwmqZTin024o1EppE5z4I+C40CPZUgHO92MHheEkkHMpALdtb ddkuMeXQ==; Received: from [187.74.70.209] (helo=steammachine.lan) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1qK3w9-00EDEa-7m; Thu, 13 Jul 2023 23:33:21 +0200 From: =?UTF-8?q?Andr=C3=A9=20Almeida?= To: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: kernel-dev@igalia.com, alexander.deucher@amd.com, christian.koenig@amd.com, pierre-eric.pelloux-prayer@amd.com, =?UTF-8?q?=27Marek=20Ol=C5=A1=C3=A1k=27?= , Samuel Pitoiset , Bas Nieuwenhuizen , =?UTF-8?q?Timur=20Krist=C3=B3f?= , michel.daenzer@mailbox.org, =?UTF-8?q?Andr=C3=A9=20Almeida?= Subject: [PATCH v2 2/6] drm/amdgpu: Allocate coredump memory in a nonblocking way Date: Thu, 13 Jul 2023 18:32:38 -0300 Message-ID: <20230713213242.680944-3-andrealmeid@igalia.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230713213242.680944-1-andrealmeid@igalia.com> References: <20230713213242.680944-1-andrealmeid@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org During a GPU reset, a normal memory reclaim could block to reclaim memory. Giving that coredump is a best effort mechanism, it shouldn't disturb the reset path. Change its memory allocation flag to a nonblocking one. Signed-off-by: André Almeida --- v2: New patch drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index e25f085ee886..a824f844a984 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -5011,7 +5011,7 @@ static void amdgpu_reset_capture_coredumpm(struct amdgpu_device *adev) struct drm_device *dev = adev_to_drm(adev); ktime_get_ts64(&adev->reset_time); - dev_coredumpm(dev->dev, THIS_MODULE, adev, 0, GFP_KERNEL, + dev_coredumpm(dev->dev, THIS_MODULE, adev, 0, GFP_NOWAIT, amdgpu_devcoredump_read, amdgpu_devcoredump_free); } #endif -- 2.41.0