Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp2656937rwp; Fri, 14 Jul 2023 09:14:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlHmqMjhZD5SAifzpFjhhDRauB8kssDJ/8jim9FeXGwKHnSPGX/bBGj2CP7tcyiI42NwacHN X-Received: by 2002:a17:902:f68b:b0:1ae:6cf0:94eb with SMTP id l11-20020a170902f68b00b001ae6cf094ebmr4470436plg.5.1689351266495; Fri, 14 Jul 2023 09:14:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689351266; cv=none; d=google.com; s=arc-20160816; b=b9iLOZtnPLJ0On1sLWwO8Y3N7m4Sl2bGHwFHuhTATOwzVgNoCLSPyZVqMnx+8zrEX8 4jFFzx2398S1imOCFomTRV5CiDv+xT/yxiFLe6GuT1kQIAjg7NDNF6O+9CIEt1HAIZBp Uwa2s3BHmQLi4G1gbpmXQVVHtffK/9hz/1xOQIvxCKuzEVmxRWzAYQ+Ixy0HehToBLxv PPCjY3Yt8pzWCnHukJ6ny7NIQcthVi05rLbRQUU7xOKHRo95gcleOi+GDalKFW/gUtSC aJcPsamfO/iLD+kvACnZ3ka3YJA670WRTCQWtW7KHhReW/O/G0y8cbYbVR0O9fLFYxET Tvag== 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=zIgp80+eQBdnIXRtmt80Wa1T4Fgh2Xesu535mvlv8DU=; fh=aYwOFvh45AiUk04AC35/CxFbCKpYy0XHNT+Ky7LGVhk=; b=G4CGZm6bpd6jlVRHtPEmYfKSQqdpErIguxJ9wWED2q3pnl3OURSJnz1q5glSxe1fQT EeBjKJmV/dRdxWbLaUmXLXnbPSlXzX4lgZy69+GVVbe6jYL+oBkLTtW3Qb7ABRh/5ic9 NkeabYqrEL7T2Dv+CbhiOSJ7pMgjt8iQcQ60PUhJt1vedA7rLPNvRfiru2f0Ofq3SPDq rSaYmFgxyvmO7QzMi8RqTNvImIKHJVAVgRJVo/QxbXGP3y24oQ1G1DsiGwxyhanXI9eO 6tDeQGnOz/aalFaEeC+h4mQdmvEep3v3ToG5LYOsFqj9dAi+F1YaL+82Zlx2y0qDf5X3 mooQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=PDiktgmj; 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 j8-20020a170902da8800b001b3c63eba76si2665080plx.492.2023.07.14.09.14.14; Fri, 14 Jul 2023 09:14:26 -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=PDiktgmj; 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 S236201AbjGNQLx (ORCPT + 99 others); Fri, 14 Jul 2023 12:11:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236113AbjGNQLp (ORCPT ); Fri, 14 Jul 2023 12:11:45 -0400 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 115F635B0 for ; Fri, 14 Jul 2023 09:11:43 -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=zIgp80+eQBdnIXRtmt80Wa1T4Fgh2Xesu535mvlv8DU=; b=PDiktgmjGmtw6OSOZXfulTKykc xdQ3jsP7z7Dzm/1e0LRtHjTaMQGCZBUeyt6RpWtqv+w6cLAyqkpPChY6E28V1osqIFgBkxFIGz5zP b/kLHpoASocNpL2ckKWFjfcJsZV9iF3rA54QT7qL7O+c0rO7Squd7+WzcL8N35UTYyKOkQPoE+OBx tgkWYRf31Lv/+BYhIqbpvIodSRWho4ixm8+OVABxz85BBTPkKh2Qyf4VI4Ca0kKdzWIq8vZecWt8j TmyG2FvPTjy7udp6w7Uiu1t04wfFt94O6Vv6gx7AnBchHAmPkcevhDicvJwJwgEPMnHeDECcJ/xIa vGBu6gKA==; 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 1qKLOO-00Eaot-HJ; Fri, 14 Jul 2023 18:11:40 +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 v3 2/5] drm/amdgpu: Allocate coredump memory in a nonblocking way Date: Fri, 14 Jul 2023 13:11:25 -0300 Message-ID: <20230714161128.69545-3-andrealmeid@igalia.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230714161128.69545-1-andrealmeid@igalia.com> References: <20230714161128.69545-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,URIBL_BLOCKED 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 Reviewed-by: Christian König --- 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