Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp591031rdg; Thu, 10 Aug 2023 12:30:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGXKIFOthmD+ayXjTqAicSeqlLu22EbhxJzpQcn2vo1MS1xapEH9sDT8y8O0AdMjCRn0d3q X-Received: by 2002:aa7:c2c6:0:b0:523:100b:462b with SMTP id m6-20020aa7c2c6000000b00523100b462bmr3109432edp.5.1691695849202; Thu, 10 Aug 2023 12:30:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691695849; cv=none; d=google.com; s=arc-20160816; b=n+4Cs8qnL2D6rEH7zgAm60lR6Jf/fOQjQO0++dE2ytvu3GRj7MMoetoZLRXoCHmmvo GsSZX9ww6IVyy23It3CBIbav+5IlALkwc/iuM4TYUL+BJBlKCKdsl7+rpT0dHX7bq+le Lu20M8rJPPS3SV8YI2qN6v8tl1fLfgZ3qwCL12HiHA8ULyZ+DZJlaqqtSmgMLjnYzOeN BzTPZk41JEveN/kpef8eiGlCrmQ6EvnUYm4E7JA3ExyY5TUMwiUrKWFggwSFZMdzK9iI D60Fe9nw/+CZvu1iy9KC2LVKfkrPAEAF7d+40htJXwgub9rPAntHkd0eqRvWY/Ary95A WzFw== 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=0So8O3/MNtUi08+iM0GTq8USjRthw2+S2AnIdqjvHuo=; fh=4drWZfXh6M/zU5TbzJpAHkpGJffjB2tpWVKmXKr8SAQ=; b=m8bLFiJsNPOLVpPE5us35CW7F0u6Q8cwwJ09uYd2TM6eF5Igf6H3g69y61EIEaruEo fWbzDdsILA/tMQpqF4H28CJbYIZYL01hlSyRu/t1lTSPp1lbA5rDVITLc+flcwNKzfUZ xhisbkFkoYzS+lNXKS/3uaxDFgn1QaWTWrCzpJwvoRhYDAYm+tmW5MJYKDbzBZL0ZlBV H+wEBjHRM3Z97TxX5vhKMZaGydH8hFe8fZZzAmwi8Fhc4ETc1LX7Y+sUdC5T7mjva1/U 679Nohv+HuE6dtpUzictCvnnmtmm83q+rfnpcEjg0stl9yW4OiGq0u30dfdLawhMBZjs 8mzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b="GdTQ/igk"; 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 w2-20020a056402070200b0052334df2190si2087784edx.169.2023.08.10.12.30.24; Thu, 10 Aug 2023 12:30:49 -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="GdTQ/igk"; 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 S236380AbjHJTXv (ORCPT + 99 others); Thu, 10 Aug 2023 15:23:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236275AbjHJTXo (ORCPT ); Thu, 10 Aug 2023 15:23:44 -0400 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06D3390 for ; Thu, 10 Aug 2023 12:23:44 -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=0So8O3/MNtUi08+iM0GTq8USjRthw2+S2AnIdqjvHuo=; b=GdTQ/igkQRc/hhcxe1Y/3weWmF +q/7MKQxvDn81dRdeKQ3qt5mTcOcvoCb7JMYmIAC6iEeF7oj4mkQ0yFnlyvmfnqF87SzmxVlPpZtS iCmLKzRcmTnYAjiJuOdJSjeTw6PQ8PRbwjEMnCxWtCUJ23sOCg8Y91nFcJ/PIuxcCAc0M5DehPYJX fF0Wsr6+KH7Gy2Wu2DTa/eNkkWhZ9qzfso7SPNTNx/WYoLoTT2yfLJA65bTQa2Q79tETqyH3vRHg5 peXVRGPXYyuYy/FRoilEZ5vmLF6rh46uUfkCcq4G0A0lSz5Hv8m0k3fIC1PjdjD5csgo5GxH+vQXU no4McpTA==; Received: from [191.193.179.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 1qUBG1-00Gp5H-La; Thu, 10 Aug 2023 21:23:42 +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?= , =?UTF-8?q?Andr=C3=A9=20Almeida?= Subject: [RESEND v3 2/5] drm/amdgpu: Allocate coredump memory in a nonblocking way Date: Thu, 10 Aug 2023 16:23:27 -0300 Message-ID: <20230810192330.198326-3-andrealmeid@igalia.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230810192330.198326-1-andrealmeid@igalia.com> References: <20230810192330.198326-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,SPF_HELO_NONE,SPF_PASS 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 aa171db68639..bf4781551f88 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -4847,7 +4847,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